具体报错如下:
D:\Anaconda\000\envs\yy009\python.exe F:\code_test\yy009\CZ4042-CycleGAN-Music-Transfer-master\main.py --dataset_A_dir=JC_J --dataset_B_dir=JC_C --phase=train --type=cyclegan --sigma_d=0
2024-04-02 17:19:12.515858: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-04-02 17:19:13.145064: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1616] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 5449 MB memory: -> device: 0, name: NVIDIA GeForce RTX 4060, pci bus id: 0000:01:00.0, compute capability: 8.9
Built model.
Initialized model.
Training start...
Traceback (most recent call last):
File "F:\code_test\yy009\CZ4042-CycleGAN-Music-Transfer-master\main.py", line 180, in <module>
model.train(args) if args.phase == "train" else model.test(args)
File "F:\code_test\yy009\CZ4042-CycleGAN-Music-Transfer-master\CycleGAN.py", line 253, in train
fake_B = self.generator_A2B(real_A, training=True)
File "D:\Anaconda\000\envs\yy009\lib\site-packages\keras\utils\traceback_utils.py", line 70, in error_handler
raise e.with_traceback(filtered_tb) from None
File "D:\Anaconda\000\envs\yy009\lib\site-packages\keras\engine\input_spec.py", line 296, in assert_input_compatibility
f'Input {input_index} of layer "{layer_name}" is '
ValueError: Input 0 of layer "Generator_A2B" is incompatible with the layer: expected shape=(None, 64, 1, 1), found shape=(4, 64, 84, 1)