matterport / Mask_RCNN

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

Can't run inspect_model.ipynb #491

Open hongym7 opened 6 years ago

hongym7 commented 6 years ago

I run inspect_model.ipynb. but i saw below message.

Loading weights /home/hong/PycharmProjects/Mask_RCNN/mask_rcnn_coco.h5

InternalError Traceback (most recent call last)

in () 14 # Load weights 15 print("Loading weights ", weights_path) ---> 16 model.load_weights(weights_path, by_name=True) ~/PycharmProjects/Mask_RCNN/mrcnn/model.py in load_weights(self, filepath, by_name, exclude) 2095 2096 if by_name: -> 2097 topology.load_weights_from_hdf5_group_by_name(f, layers) 2098 else: 2099 topology.load_weights_from_hdf5_group(f, layers) ~/venv/lib/python3.5/site-packages/keras/engine/topology.py in load_weights_from_hdf5_group_by_name(f, layers, skip_mismatch, reshape) 3466 weight_values[i])) 3467 -> 3468 K.batch_set_value(weight_value_tuples) ~/venv/lib/python3.5/site-packages/keras/backend/tensorflow_backend.py in batch_set_value(tuples) 2371 assign_ops.append(assign_op) 2372 feed_dict[assign_placeholder] = value -> 2373 get_session().run(assign_ops, feed_dict=feed_dict) 2374 2375 ~/venv/lib/python3.5/site-packages/keras/backend/tensorflow_backend.py in get_session() 177 config = tf.ConfigProto(intra_op_parallelism_threads=num_thread, 178 allow_soft_placement=True) --> 179 _SESSION = tf.Session(config=config) 180 session = _SESSION 181 if not _MANUAL_VAR_INIT: ~/venv/lib/python3.5/site-packages/tensorflow/python/client/session.py in __init__(self, target, graph, config) 1507 1508 """ -> 1509 super(Session, self).__init__(target, graph, config=config) 1510 # NOTE(mrry): Create these on first `__enter__` to avoid a reference cycle. 1511 self._default_graph_context_manager = None ~/venv/lib/python3.5/site-packages/tensorflow/python/client/session.py in __init__(self, target, graph, config) 636 # pylint: enable=protected-access 637 else: --> 638 self._session = tf_session.TF_NewDeprecatedSession(opts, status) 639 finally: 640 tf_session.TF_DeleteSessionOptions(opts) ~/venv/lib/python3.5/site-packages/tensorflow/python/framework/errors_impl.py in __exit__(self, type_arg, value_arg, traceback_arg) 514 None, None, 515 compat.as_text(c_api.TF_Message(self.status.status)), --> 516 c_api.TF_GetCode(self.status.status)) 517 # Delete the underlying status object from memory otherwise it stays alive 518 # as there is a reference to status from this from the traceback due to InternalError: Failed to create session.
patrickcgray commented 6 years ago

I'm having this exact same issue. Any luck finding a solution?