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

Tqdm error (on testing) --> Batch size > 1 #23

Open
Utena opened this issue Feb 28, 2019 · 2 comments
Open

Tqdm error (on testing) --> Batch size > 1 #23

Utena opened this issue Feb 28, 2019 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@Utena
Copy link

Utena commented Feb 28, 2019

Dear Rodney LaLonde,

First of all, I would like to thank you for this amazing work and for publishing your source code! :) I really appreciate your contribution. I am also working on the field of "Capsule networks" for segmentation. I obtained some satisfactory results running your Capsr3 network with a batch size = 1, but when I increase this parameter (i.e., batch size = 2) the code crashes! More specifically, the following error appears only on testing time:

38/75 [==============>...............] - ETA: 5sException KeyError: KeyError(<weakref at 0x7f88e74e5f70; to 'tqdm' at 0x7f88e7500d90>,) in <bound method tqdm.__del__ of   0%|                                                                          | 0/18 [00:05<?, ?it/s]> ignored
Traceback (most recent call last):
  File "main.py", line 169, in <module>
    main(arguments)
  File "main.py", line 81, in main
    test(args, test_list, model_list, net_input_shape)
  File "/home/.../.../SegCapsOfficial/test.py", line 139, in test
    use_multiprocessing=False, verbose=1)
  File "/home/.../.../tf9.1/lib/python2.7/site-packages/keras/legacy/interfaces.py", line 87, in wrapper
    return func(*args, **kwargs)
  File "/home/.../.../tf9.1/lib/python2.7/site-packages/keras/engine/training.py", line 2407, in predict_generator
    generator_output = next(output_generator)
  File "/home/.../.../tf9.1/lib/python2.7/site-packages/keras/utils/data_utils.py", line 727, in get
    raise StopIteration()
StopIteration

I tried to solve it following this post: , but the error still persists and it is not possible to run the networks with a batch size > 1! Is someone also concerned about this bug? My Python and Tqdm versions are these ones:

Python 2.7.14
Tqdm 4.23.3

Thank you folks! ;)
Jordina

@lalonderodney
Copy link
Owner

Hello @Utena ,

I have not encountered this issue. My images are so large I can only run with batch size of 1 but I have other versions of this code which run with batch size > 1 no problem (for other projects I am working on ;) ). Is anyone else able to reproduce this bug?

@lalonderodney lalonderodney added the help wanted Extra attention is needed label Apr 9, 2019
@Utena
Copy link
Author

Utena commented Apr 10, 2019

Good morning @lalonderodney !

Thank you very much for your response :) Do you have the same Tqdm 4.23.3 version like me? It is a little bit strange, since this error only appears in testing time... >.< I can train my capsule network with no bugs (images of size 224 x 224).

Cheers :-* !
Jordina

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants