All,
after completing the assignment, i downloaded the whole workspace and ran it in a virtual environment with the same package versions as in Coursera.
It works up to the cell:
yolo_model = load_model(“model_data/”, compile=False)
which throws the following error.
In my local directory all files are present with the same files sizes, like in Coursera.
Any ideas on where to look to make it run?
IndexError Traceback (most recent call last)
in
----> 1 yolo_model = load_model(“model_data/”, compile=False)
C:\ProgramData\Anaconda3\envs\coursera_env\lib\site-packages\tensorflow\python\keras\saving\save.py in load_model(filepath, custom_objects, compile, options)
185 if isinstance(filepath, six.string_types):
186 loader_impl.parse_saved_model(filepath)
→ 187 return saved_model_load.load(filepath, compile, options)
188
189 raise IOError(
C:\ProgramData\Anaconda3\envs\coursera_env\lib\site-packages\tensorflow\python\keras\saving\saved_model\load.py in load(path, compile, options)
119
120 model = tf_load.load_internal(
→ 121 path, options=options, loader_cls=KerasObjectLoader)
122
123 # pylint: disable=protected-access
C:\ProgramData\Anaconda3\envs\coursera_env\lib\site-packages\tensorflow\python\saved_model\load.py in load_internal(export_dir, tags, options, loader_cls)
631 try:
632 loader = loader_cls(object_graph_proto, saved_model_proto, export_dir,
→ 633 ckpt_options)
634 except errors.NotFoundError as err:
635 raise FileNotFoundError(
C:\ProgramData\Anaconda3\envs\coursera_env\lib\site-packages\tensorflow\python\keras\saving\saved_model\load.py in init(self, *args, **kwargs)
192 self._models_to_reconstruct =
193
→ 194 super(KerasObjectLoader, self).init(*args, **kwargs)
195
196 # Now that the node object has been fully loaded, and the checkpoint has
C:\ProgramData\Anaconda3\envs\coursera_env\lib\site-packages\tensorflow\python\saved_model\load.py in init(self, object_graph_proto, saved_model_proto, export_dir, ckpt_options)
129
130 self._load_all()
→ 131 self._restore_checkpoint()
132
133 for node in self._nodes:
C:\ProgramData\Anaconda3\envs\coursera_env\lib\site-packages\tensorflow\python\saved_model\load.py in _restore_checkpoint(self)
326 if self._expect_partial_checkpoint:
327 load_status = saver.restore(variables_path,
→ 328 self._checkpoint_options).expect_partial()
329 else:
330 load_status = saver.restore(variables_path, self._checkpoint_options)
C:\ProgramData\Anaconda3\envs\coursera_env\lib\site-packages\tensorflow\python\training\tracking\util.py in restore(self, save_path, options)
1280 dtype_map = reader.get_variable_to_dtype_map()
1281 try:
→ 1282 object_graph_string = reader.get_tensor(base.OBJECT_GRAPH_PROTO_KEY)
1283 except errors_impl.NotFoundError:
1284 # The object graph proto does not exist in this checkpoint. Try the
C:\ProgramData\Anaconda3\envs\coursera_env\lib\site-packages\tensorflow\python\training\py_checkpoint_reader.py in get_tensor(self, tensor_str)
68 try:
69 return CheckpointReader.CheckpointReader_GetTensor(
—> 70 self, compat.as_bytes(tensor_str))
71 # TODO(b/143319754): Remove the RuntimeError casting logic once we resolve the
72 # issue with throwing python exceptions from C++.
IndexError: Read fewer bytes than requested