Giter VIP home page Giter VIP logo

Comments (7)

harshithdwivedi avatar harshithdwivedi commented on May 14, 2024

Same issue here. This is the error I get with mobilenetV2 backend.

status = self.read(save_path, options=options)
    File "/Users/harshithdwivedi/.pyenv/versions/tf_macos_orig/lib/python3.8/site-packages/tensorflow/python/training/tracking/util.py", line 2148, in read
      return self._saver.restore(save_path=save_path, options=options)
    File "/Users/harshithdwivedi/.pyenv/versions/tf_macos_orig/lib/python3.8/site-packages/tensorflow/python/training/tracking/util.py", line 1336, in restore
      base.CheckpointPosition(
    File "/Users/harshithdwivedi/.pyenv/versions/tf_macos_orig/lib/python3.8/site-packages/tensorflow/python/training/tracking/base.py", line 253, in restore
      restore_ops = trackable._restore_from_checkpoint_position(self)  # pylint: disable=protected-access
    File "/Users/harshithdwivedi/.pyenv/versions/tf_macos_orig/lib/python3.8/site-packages/tensorflow/python/training/tracking/base.py", line 972, in _restore_from_checkpoint_position
      current_position.checkpoint.restore_saveables(
    File "/Users/harshithdwivedi/.pyenv/versions/tf_macos_orig/lib/python3.8/site-packages/tensorflow/python/training/tracking/util.py", line 307, in restore_saveables
      new_restore_ops = functional_saver.MultiDeviceSaver(
    File "/Users/harshithdwivedi/.pyenv/versions/tf_macos_orig/lib/python3.8/site-packages/tensorflow/python/training/saving/functional_saver.py", line 345, in restore
      restore_ops = restore_fn()
    File "/Users/harshithdwivedi/.pyenv/versions/tf_macos_orig/lib/python3.8/site-packages/tensorflow/python/training/saving/functional_saver.py", line 321, in restore_fn
      restore_ops.update(saver.restore(file_prefix, options))
    File "/Users/harshithdwivedi/.pyenv/versions/tf_macos_orig/lib/python3.8/site-packages/tensorflow/python/training/saving/functional_saver.py", line 115, in restore
      restore_ops[saveable.name] = saveable.restore(
    File "/Users/harshithdwivedi/.pyenv/versions/tf_macos_orig/lib/python3.8/site-packages/tensorflow/python/training/saving/saveable_object_util.py", line 131, in restore
      return resource_variable_ops.shape_safe_assign_variable_handle(
    File "/Users/harshithdwivedi/.pyenv/versions/tf_macos_orig/lib/python3.8/site-packages/tensorflow/python/ops/resource_variable_ops.py", line 307, in shape_safe_assign_variable_handle
      shape.assert_is_compatible_with(value_tensor.shape)
    File "/Users/harshithdwivedi/.pyenv/versions/tf_macos_orig/lib/python3.8/site-packages/tensorflow/python/framework/tensor_shape.py", line 1134, in assert_is_compatible_with
      raise ValueError("Shapes %s and %s are incompatible" % (self, other))
  ValueError: Shapes (1, 1, 192, 64) and (1, 1, 32, 64) are incompatible

from retinaface-tf2.

vba34520 avatar vba34520 commented on May 14, 2024

It will work at tensorflow-gpu==2.1.0.

pip install tensorflow-gpu==2.1.0

from retinaface-tf2.

fangxiaoying avatar fangxiaoying commented on May 14, 2024

meet the same issue that can not work with mobilenet_v2

(env-tf2.1) gnar@ubuntu:~/python/retinaface-tf2$ python test.py --cfg_path="./configs/retinaface_mbv2.yaml" --img_path="./data/0_Parade_marchingband_1_149.jpg" --down_scale_factor=1.0
Traceback (most recent call last):
File "test.py", line 130, in
app.run(main)
File "/home/gnar/Documents/env-tf2.1/lib/python3.7/site-packages/absl/app.py", line 303, in run
_run_main(main, args)
File "/home/gnar/Documents/env-tf2.1/lib/python3.7/site-packages/absl/app.py", line 251, in _run_main
sys.exit(main(argv))
File "test.py", line 44, in main
checkpoint.restore(tf.train.latest_checkpoint(checkpoint_dir))
File "/home/gnar/Documents/env-tf2.1/lib/python3.7/site-packages/tensorflow/python/training/tracking/util.py", line 2260, in restore
status = self.read(save_path, options=options)
File "/home/gnar/Documents/env-tf2.1/lib/python3.7/site-packages/tensorflow/python/training/tracking/util.py", line 2148, in read
return self._saver.restore(save_path=save_path, options=options)
File "/home/gnar/Documents/env-tf2.1/lib/python3.7/site-packages/tensorflow/python/training/tracking/util.py", line 1337, in restore
checkpoint=checkpoint, proto_id=0).restore(self._graph_view.root)
File "/home/gnar/Documents/env-tf2.1/lib/python3.7/site-packages/tensorflow/python/training/tracking/base.py", line 253, in restore
restore_ops = trackable._restore_from_checkpoint_position(self) # pylint: disable=protected-access
File "/home/gnar/Documents/env-tf2.1/lib/python3.7/site-packages/tensorflow/python/training/tracking/base.py", line 973, in _restore_from_checkpoint_position
tensor_saveables, python_saveables))
File "/home/gnar/Documents/env-tf2.1/lib/python3.7/site-packages/tensorflow/python/training/tracking/util.py", line 308, in restore_saveables
validated_saveables).restore(self.save_path_tensor, self.options)
File "/home/gnar/Documents/env-tf2.1/lib/python3.7/site-packages/tensorflow/python/training/saving/functional_saver.py", line 345, in restore
restore_ops = restore_fn()
File "/home/gnar/Documents/env-tf2.1/lib/python3.7/site-packages/tensorflow/python/training/saving/functional_saver.py", line 321, in restore_fn
restore_ops.update(saver.restore(file_prefix, options))
File "/home/gnar/Documents/env-tf2.1/lib/python3.7/site-packages/tensorflow/python/training/saving/functional_saver.py", line 116, in restore
restored_tensors, restored_shapes=None)
File "/home/gnar/Documents/env-tf2.1/lib/python3.7/site-packages/tensorflow/python/training/saving/saveable_object_util.py", line 132, in restore
self.handle_op, self._var_shape, restored_tensor)
File "/home/gnar/Documents/env-tf2.1/lib/python3.7/site-packages/tensorflow/python/ops/resource_variable_ops.py", line 307, in shape_safe_assign_variable_handle
shape.assert_is_compatible_with(value_tensor.shape)
File "/home/gnar/Documents/env-tf2.1/lib/python3.7/site-packages/tensorflow/python/framework/tensor_shape.py", line 1134, in assert_is_compatible_with
raise ValueError("Shapes %s and %s are incompatible" % (self, other))
ValueError: Shapes (1, 1, 192, 64) and (1, 1, 32, 64) are incompatible

from retinaface-tf2.

ivanfadillahgdp avatar ivanfadillahgdp commented on May 14, 2024

I get same issue in MobileNetV2

Shapes (1, 1, 192, 64) and (1, 1, 32, 64) are incompatible

from retinaface-tf2.

md11235 avatar md11235 commented on May 14, 2024

I get same issue in MobileNetV2

Shapes (1, 1, 192, 64) and (1, 1, 32, 64) are incompatible

Please ensure the model file is trained/saved and loaded with the same version of TensorFlow.

from retinaface-tf2.

GrigoriiTarasov avatar GrigoriiTarasov commented on May 14, 2024
pip install tensorflow-gpu==2.1.0
ERROR: Could not find a version that satisfies the requirement tensorflow-gpu==2.1.0
ERROR: No matching distribution found for tensorflow-gpu==2.1.0

In Ubuntu, is this repo is Windows only?

from retinaface-tf2.

omzoughi avatar omzoughi commented on May 14, 2024

Dear all,

I got the same error: Shapes (1, 1, 192, 64) and (1, 1, 32, 64) are incompatible

I need to check if it is due to tensorflow version incomapatibility , and since working on colab should we reproduce training to get checkpoint compatible version?

Thanks for help

from retinaface-tf2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.