Gregor-W / BT-Wender

This is the Repo for the Thesis of G. Wender
GNU General Public License v3.0
1 stars 0 forks source link

Setup and first testing of colab #5

Open Gregor-W opened 4 years ago

Gregor-W commented 4 years ago

cobothub2@gmail.com (cobothub2%40gmail.com)

MrDio commented 4 years ago

Achtung:

Falls dieser FEhler auftaucht: !python train_ggcnn.py

Using TensorFlow backend. 2020-04-23 09:02:58.289359: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer.so.6'; dlerror: libnvinfer.so.6: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/nvidia/lib:/usr/local/nvidia/lib64 2020-04-23 09:02:58.289524: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer_plugin.so.6'; dlerror: libnvinfer_plugin.so.6: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/nvidia/lib:/usr/local/nvidia/lib64 2020-04-23 09:02:58.289566: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:30] Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly. Traceback (most recent call last): File "train_ggcnn.py", line 91, in x = Conv2D(no_filters[0], kernel_size=filter_sizes[0], strides=(3, 3), padding='same', activation='relu')(input_layer) File "/usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py", line 75, in symbolic_fn_wrapper return func(*args, **kwargs) File "/usr/local/lib/python3.6/dist-packages/keras/engine/base_layer.py", line 446, in call self.assert_input_compatibility(inputs) File "/usr/local/lib/python3.6/dist-packages/keras/engine/base_layer.py", line 342, in assert_input_compatibility str(K.ndim(x))) ValueError: Input 0 is incompatible with layer conv2d_1: expected ndim=4, found ndim=2

--

Der Master-branch des ggcnn_development_process-Repositorys beinhaltet eine unmodifizierte GGCNN-Variante (als Basis für die anderen Branches, in denen die Technical Spikes behandelt werden; Ursprung: das GGCNN-Repository). In der unmodifizierten GGCNN-Variante wird tensorflow-gpu anstatt tensorflow-cpu verwendet. Tensorflow-GPU erfordert CUDA (also Nvidia). Darüberhinaus werden die benötigten (Pip-)Pakete nicht vollständig definiert, was bei mir zu Fehlern geführt hat.

Möchtest Du GGCNN ohne GPU (also mit CPU) verwenden, solltest Du die requirements.txt mit einer requirements.txt aus einem der Technical-Spike-Branches ersetzen. Möchtest Du einen der Technical Spikes verwenden, empfehle ich Dir das Klonen des entsprechenden Branches des ggcnn_development_process-Repositorys.

Bitte beachte, dass du ggf. alle zuvor installierten Pip-Pakete (aus der Virtual Env) entfernst, weil Tensorflow-GPU und Tensorflow-CPU nicht gleichzeitig installiert sein kann und die verschiedenen Versionen andere Pakete auch zum Konflikt führen können.

seivazi commented 4 years ago

@MrDio in case your problem is related to file size. Check the following: https://dev.to/kojikanao/download-files-from-google-drive-with-curl-wget-5e4o

Gregor-W commented 4 years ago

Traceback (most recent call last): File "train_ggcnn.py", line 137, in validation_data=(x_test, y_test) File "/usr/local/lib/python3.6/dist-packages/keras/engine/training.py", line 1239, in fit validation_freq=validation_freq) File "/usr/local/lib/python3.6/dist-packages/keras/engine/training_arrays.py", line 119, in fit_loop callbacks.set_model(callback_model) File "/usr/local/lib/python3.6/dist-packages/keras/callbacks/callbacks.py", line 68, in set_model callback.set_model(model) File "/usr/local/lib/python3.6/dist-packages/keras/callbacks/tensorboard_v2.py", line 116, in set_model super(TensorBoard, self).set_model(model) File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/keras/callbacks.py", line 1532, in set_model self.log_dir, self.model._get_distribution_strategy()) # pylint: disable=protected-access AttributeError: 'Model' object has no attribute '_get_distribution_strategy'

I get a different error, but it seams like a first model is created before that happens

Gregor-W commented 4 years ago

Got it fixed now using this: https://github.com/googlecolab/colabtools/issues/925 Should I change that in our git code too?