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

requirements.txt is broken #1

Open
chelm opened this issue Aug 29, 2018 · 4 comments
Open

requirements.txt is broken #1

chelm opened this issue Aug 29, 2018 · 4 comments

Comments

@chelm
Copy link

chelm commented Aug 29, 2018

It looks like some stdout/stderr got logged to the requirement.txt file, so we're unable to install the needed deps.

Great project btw!

@Geoyi
Copy link
Owner

Geoyi commented Aug 29, 2018

@chelm, pretty cool that you tried it out and filed the first issue ever on this repo. I fixed the dependencies on requirement.txt, do you want to give another try?

@paumillet
Copy link

Hello,

Thanks for sharing your project!

I still got conflict versions with the update of requirements.txt
Here are the bugs I met:

  • Conflicting versions of decorator

    pkg_resources.ContextualVersionConflict: (decorator 4.1.2 (/usr/local/lib/python3.6/dist-packages), Requirement.parse('decorator>=4.3.0'), {'networkx'})
    

    fixed by upgrading decorator to 4.3.0 and changing the corresponding line in requirements.txt

  • Missing packages

    ModuleNotFoundError: No module named 'tensorflow'
    

    and

    ModuleNotFoundError: No module named 'cv2'
    

    so I installed tensorflow and opencv-python

  • I was using Keras 2.2.2 but

    from keras.applications.imagenet_utils import _obtain_input_shape
    ImportError: cannot import name '_obtain_input_shape'
    

    I turned keras.applications.imagenet_utils to keras_applications.imagenet_utils, it seems to do the trick.
    There are also conflicts with tensorflow 1.11.0:

    keras 2.2.2 has requirement keras-applications==1.0.4, but you'll have keras-applications 1.0.5 which is incompatible.
    keras 2.2.2 has requirement keras-preprocessing==1.0.2, but you'll have keras-preprocessing 1.0.3 which is incompatible.
    

    So I downgraded tensorflow to version 1.10.0

I was then able to start the training. But I got another error then... I'm not sure if it's from the changes I made or something else. It happens when it will start the 1st epoch training. Here is the complete error, tell me whether it worth opening a new issue:

Traceback (most recent call last):
  File "/home/pauline/Documents/POCteledetection/pixel-decoder/venv/bin/pixel_decoder", line 11, in <module>
    load_entry_point('pixel-decoder', 'console_scripts', 'pixel_decoder')()
  File "/home/pauline/Documents/POCteledetection/pixel-decoder/pixel_decoder/main.py", line 75, in cli
    main(args.pop('command'), **args)
  File "/home/pauline/Documents/POCteledetection/pixel-decoder/pixel_decoder/main.py", line 56, in main
    train(**kwargs)
  File "/home/pauline/Documents/POCteledetection/pixel-decoder/pixel_decoder/train.py", line 70, in train
    callbacks=[model_checkpoint])
  File "/home/pauline/Documents/POCteledetection/pixel-decoder/venv/lib/python3.6/site-packages/keras/legacy/interfaces.py", line 91, in wrapper
    return func(*args, **kwargs)
  File "/home/pauline/Documents/POCteledetection/pixel-decoder/venv/lib/python3.6/site-packages/keras/engine/training.py", line 1415, in fit_generator
    initial_epoch=initial_epoch)
  File "/home/pauline/Documents/POCteledetection/pixel-decoder/venv/lib/python3.6/site-packages/keras/engine/training_generator.py", line 213, in fit_generator
    class_weight=class_weight)
  File "/home/pauline/Documents/POCteledetection/pixel-decoder/venv/lib/python3.6/site-packages/keras/engine/training.py", line 1215, in train_on_batch
    outputs = self.train_function(ins)
  File "/home/pauline/Documents/POCteledetection/pixel-decoder/venv/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 2666, in __call__
    return self._call(inputs)
  File "/home/pauline/Documents/POCteledetection/pixel-decoder/venv/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 2636, in _call
    fetched = self._callable_fn(*array_vals)
  File "/home/pauline/Documents/POCteledetection/pixel-decoder/venv/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1382, in __call__
    run_metadata_ptr)
  File "/home/pauline/Documents/POCteledetection/pixel-decoder/venv/lib/python3.6/site-packages/tensorflow/python/framework/errors_impl.py", line 519, in __exit__
    c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.InvalidArgumentError: Incompatible shapes: [786432] vs. [262144]
         [[Node: metrics/dice_coef/mul = Mul[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"](metrics/dice_coef/Reshape, metrics/dice_coef/Reshape_1)]]

@Geoyi
Copy link
Owner

Geoyi commented Sep 28, 2018

@paumillet, thanks for posting the issue.
Can you make a pull request to the requirement.txt on what you've installed for tensorflow and opencv-python?
The error you got was from the label data, and you may want to look into another issue, I posted a solution there. Hope that is helpful if you keep getting error, let me know.

@paumillet
Copy link

paumillet commented Oct 3, 2018

Thank you @Geoyi, it solved my problem!

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

3 participants