matterport / Mask_RCNN

Mask R-CNN for object detection and instance segmentation on Keras and TensorFlow
Other
24.71k stars 11.71k forks source link

ModuleNotFoundError: No module named 'tensorflow.contrib.tensorboard'; 'tensorflow.contrib' is not a package During handling of the above exception, another exception occurred: #2094

Open tianke0711 opened 4 years ago

tianke0711 commented 4 years ago

my TensorFlow-gpu is 15.0

oduleNotFoundError Traceback (most recent call last) /opt/conda/lib/python3.6/site-packages/keras/callbacks.py in init(self, log_dir, histogram_freq, batch_size, write_graph, write_grads, write_images, embeddings_freq, embeddings_layer_names, embeddings_metadata, embeddings_data, update_freq) 744 import tensorflow as tf --> 745 from tensorflow.contrib.tensorboard.plugins import projector 746 except ImportError:

ModuleNotFoundError: No module named 'tensorflow.contrib.tensorboard'; 'tensorflow.contrib' is not a package

During handling of the above exception, another exception occurred:

ImportError Traceback (most recent call last)

in 1 # train weights (output layers or 'heads') ----> 2 model.train(train_set, test_set, learning_rate=config.LEARNING_RATE, epochs=5, layers='heads') ~/.local/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py in train(self, train_dataset, val_dataset, learning_rate, epochs, layers, augmentation, custom_callbacks, no_augmentation_sources) 2339 callbacks = [ 2340 keras.callbacks.TensorBoard(log_dir=self.log_dir, -> 2341 histogram_freq=0, write_graph=True, write_images=False), 2342 keras.callbacks.ModelCheckpoint(self.checkpoint_path, 2343 verbose=0, save_weights_only=True), /opt/conda/lib/python3.6/site-packages/keras/callbacks.py in __init__(self, log_dir, histogram_freq, batch_size, write_graph, write_grads, write_images, embeddings_freq, embeddings_layer_names, embeddings_metadata, embeddings_data, update_freq) 745 from tensorflow.contrib.tensorboard.plugins import projector 746 except ImportError: --> 747 raise ImportError('You need the TensorFlow module installed to ' 748 'use TensorBoard.') 749 ImportError: You need the TensorFlow module installed to use TensorBoard. ​
bangnghh commented 4 years ago

I have the same issue, need help !

x12901 commented 4 years ago

I have the same issue, need help !

bangnghh commented 4 years ago

I have the same issue, need help !

renew anaconda environment, tensorflow=1.14

shanlyw commented 7 months ago

in the file“callbacks.py” change "from tensorflow.contrib.tensorboard.plugins import projector" to "from tensorboard.plugins import projector" 3