-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
np.shape incompatible error in style_classifier.py #8
Comments
Hello, Gong. So you want to train the genre classifier? If you want to train cyclegan model, the type should be cyclegan instead of classifier. |
The error trace when I use cyclegan with the command "python3 main.py --dataset_A_dir=jazz --dataset_B_dir=classic --type=cyclegan --model=base --sigma_c=0 --sigma_d=0 --phase=train --which_direction=AtoB" is: generatorA2B/g_e1_c/Conv/weights:0 Traceback (most recent call last): |
I tried by myself and it actually can run. PS. I'll upload the data sets which can be used directly. |
It would be great if you could upload the data sets directly! I checked the shape of each npy file I send in and it's also (1, 64, 84, 1), so I'm not sure that's the issue? |
Well, it's weird. It should run... |
I didn't change any of the code, other than adding os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' after os.environ["CUDA_VISIBLE_DEVICES"] = "0". I printed out the shape of batch_files and it's (16, 2), but the line batch_images = [load_npy_data(batch_file) for batch_file in batch_files] causes the error I printed above. |
I checked the load_npy_data() function in the utlis.py. |
Ah, my npy_A and npy_B shapes are (1, 64, 84, 1). I get the error: |
I have uploaded the datasets. You can find it in the Dataset part in ReadMe. |
Thanks! I used your data and there was no error; however, the program ran and there was no additional output other than the initialization of weights, etc. There was an output in the log, but that was it. Where might I find and save the model that I can use to test data on? |
Hi! I was able to get the code working, but unfortunately, my computer isn't powerful enough to do the training...I was wondering if you'd be willing to upload your weights so I can run the model and see how it works? Thanks a lot! |
Sorry I don't have time to do this recently due to the final exams. I'll do it later. |
No worries, I understand! I was wondering if you had any spare time to do it now? |
Hi @sumuzhao do you still have the pretrained model weights? |
I'm currently using the following command in command prompt on a PC to train the models using the split numpy arrays in ascending order as instructed in the data section of the README: python3 main.py --dataset_A_dir=jazz --dataset_B_dir=classic --type=classifier --model=base --sigma_c=0 --sigma_d=0 --phase=train --which_direction=AtoB
My data is in the np.shape (1, 64, 84, 1), as specified, but the gaussian noise being added is not of the right dimension in style_classifier.py. Is my data in the wrong format? What needs to be changed? Thanks!
The text was updated successfully, but these errors were encountered: