Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while running on tf2.4 #26

Open
harshithdwivedi opened this issue Jan 26, 2021 · 3 comments
Open

Error while running on tf2.4 #26

harshithdwivedi opened this issue Jan 26, 2021 · 3 comments

Comments

@harshithdwivedi
Copy link

On running the pretrained mobilenet model on tf2.4; I get the following error:


  14:45:53.439 > Traceback (most recent call last):
    File "main.py", line 19, in <module>
    File "_aftershoot.py", line 217, in _aftershoot.run_inference
    File "_aftershoot.py", line 60, in _aftershoot.init_jpegs
    File "raw_handler\img_init.py", line 31, in init raw_handler.img_init
    File "ml_modules\face_detector\FaceDetector.py", line 120, in ml_modules.face_detector.FaceDetector.BatchFaceDetector.__init__
    File "tensorflow\python\training\tracking\util.py", line 2118, in restore
    File "tensorflow\python\training\tracking\util.py", line 2035, in read
    File "tensorflow\python\training\tracking\util.py", line 1320, in restore
    File "tensorflow\python\training\tracking\base.py", line 209, in restore
    File "tensorflow\python\training\tracking\base.py", line 914, in _restore_from_checkpoint_position
    File "tensorflow\python\training\tracking\util.py", line 297, in restore_saveables
    File "tensorflow\python\training\saving\functional_saver.py", line 340, in restore
    File "tensorflow\python\training\saving\functional_saver.py", line 316, in restore_fn        
    File "tensorflow\python\training\saving\functional_saver.py", line 111, in restore
    File "tensorflow\python\training\saving\saveable_object_util.py", line 127, in restore       
    File "tensorflow\python\ops\resource_variable_ops.py", line 311, in shape_safe_assign_variable_handle
    File "tensorflow\python\framework\tensor_shape.py", line 1134, in assert_is_compatible_with  
  ValueError: Shapes (7, 7, 3, 64) and (3, 3, 3, 32) are incompatible

┗ ----------------------------
┏ Electron -------------------

  14:45:53.548 > Sentry is attempting to send 0 pending error messages
  Waiting up to 2 seconds
  Press Ctrl-Break to quit

┗ ----------------------------
┏ Electron -------------------

  14:45:55.347 > close: false

However, the resnet50 model works without any issues.

Any ideas as to what can be done to get the mobilenet model running on Tensorflow 2.4?

@peteryuX

@nospotfer
Copy link

I'm having the same issue. Trying to update to TF >= 2.4.0. Have you found a workaround for this?

@xsacha
Copy link

xsacha commented Aug 17, 2021

Also getting the same error here when testing this repository.

@HarikiranCherala
Copy link

Try converting it to saved model format after loading the checkpoint. Then load the saved model with tf >= 2.4.0 and try running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants