Skip to content
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

Issue when training in single class #23

Open
Michael-Ray-Sirius opened this issue Aug 31, 2023 · 0 comments
Open

Issue when training in single class #23

Michael-Ray-Sirius opened this issue Aug 31, 2023 · 0 comments

Comments

@Michael-Ray-Sirius
Copy link

Thanks for your interesting work!
But when I run the code 'python -m edgegan.train --name=edgegan --dataroot='/home/ai/EdgeGAN/data' --nomulticlasses --dataset=2 --gpu=0'

Traceback (most recent call last):
File "/home/ai/anaconda3/envs/EdgeGAN/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/home/ai/anaconda3/envs/EdgeGAN/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/ai/EdgeGAN/edgegan/train.py", line 138, in
tf.app.run()
File "/home/ai/anaconda3/envs/EdgeGAN/lib/python3.7/site-packages/tensorflow/python/platform/app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "/home/ai/anaconda3/envs/EdgeGAN/lib/python3.7/site-packages/absl/app.py", line 308, in run
_run_main(main, args)
File "/home/ai/anaconda3/envs/EdgeGAN/lib/python3.7/site-packages/absl/app.py", line 254, in _run_main
sys.exit(main(argv))
File "/home/ai/EdgeGAN/edgegan/train.py", line 134, in main
edgegan_model.train()
File "/home/ai/EdgeGAN/edgegan/models/edgegan.py", line 459, in train
batch_images, batch_z, batch_files = self.dataset[idx]
File "/home/ai/EdgeGAN/edgegan/utils/data/dataset.py", line 69, in getitem
batch_images = np.array(batch).astype(np.float32)
ValueError: could not broadcast input array from shape (64,128,3) into shape (64,128)

do i need to reshape the input array to the shape (64, 128) ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant