You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have updated the code to work with tensorflow2.x & using tf_slim.
When you call the Run module for inferencing facing below error:
File "\app\body_measurements.py", line 336, in main
model = RunModel(sess=sess)
^^^^^^^^^^^^^^^^^^^
File "\app\body_measurements.py", line 98, in init
self.build_test_model_ief()
File "\app\body_measurements.py", line 116, in build_test_model_ief
self.img_feat, self.E_var = img_enc_fn(self.images_pl,
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\libs\Body_measurements\src\models.py", line 47, in Encoder_resnet
net, end_points = resnet_v2.resnet_v2_50(
^^^^^^^^^^^^^^^^^^^^^^^
File "\venv_py311\Lib\site-packages\tf_slim\nets\resnet_v2.py", line 282, in resnet_v2_50
return resnet_v2(
^^^^^^^^^^
File "\venv_py311\Lib\site-packages\tf_slim\nets\resnet_v2.py", line 220, in resnet_v2
net = resnet_utils.stack_blocks_dense(net, blocks, output_stride)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "venv_py311\Lib\site-packages\tf_slim\ops\arg_scope.py", line 184, in func_with_args
return func(*args, **current_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\venv_py311\Lib\site-packages\tf_slim\nets\resnet_utils.py", line 219, in stack_blocks_dense
net = block.unit_fn(net, rate=1, **unit)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\venv_py311\Lib\site-packages\tf_slim\ops\arg_scope.py", line 184, in func_with_args
return func(*args, **current_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\venv_py311\Lib\site-packages\tf_slim\nets\resnet_v2.py", line 104, in bottleneck
preact = layers.batch_norm(
^^^^^^^^^^^^^^^^^^
File "\venv_py311\Lib\site-packages\tf_slim\ops\arg_scope.py", line 184, in func_with_args
return func(*args, **current_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\venv_py311\Lib\site-packages\tf_slim\layers\layers.py", line 663, in batch_norm
layer = normalization_layers.BatchNormalization(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\venv_py311\Lib\site-packages\tensorflow\python\layers\normalization.py", line 30, in getattr
return normalization.BatchNormalization
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\venv_py311\Lib\site-packages\tensorflow\python\util\lazy_loader.py", line 67, in getattr
module = self._load()
^^^^^^^^^^^^
File "\venv_py311\Lib\site-packages\tensorflow\python\util\lazy_loader.py", line 50, in load
module = importlib.import_module(self.name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\venv_py311\Lib\importlib_init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1126, in _find_and_load_unlocked
File "", line 241, in _call_with_frames_removed
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1140, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'tf_keras.legacy_tf_layers'
The text was updated successfully, but these errors were encountered:
I have updated the code to work with tensorflow2.x & using tf_slim.
When you call the Run module for inferencing facing below error:
File "\app\body_measurements.py", line 336, in main
model = RunModel(sess=sess)
^^^^^^^^^^^^^^^^^^^
File "\app\body_measurements.py", line 98, in init
self.build_test_model_ief()
File "\app\body_measurements.py", line 116, in build_test_model_ief
self.img_feat, self.E_var = img_enc_fn(self.images_pl,
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\libs\Body_measurements\src\models.py", line 47, in Encoder_resnet
net, end_points = resnet_v2.resnet_v2_50(
^^^^^^^^^^^^^^^^^^^^^^^
File "\venv_py311\Lib\site-packages\tf_slim\nets\resnet_v2.py", line 282, in resnet_v2_50
return resnet_v2(
^^^^^^^^^^
File "\venv_py311\Lib\site-packages\tf_slim\nets\resnet_v2.py", line 220, in resnet_v2
net = resnet_utils.stack_blocks_dense(net, blocks, output_stride)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "venv_py311\Lib\site-packages\tf_slim\ops\arg_scope.py", line 184, in func_with_args
return func(*args, **current_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\venv_py311\Lib\site-packages\tf_slim\nets\resnet_utils.py", line 219, in stack_blocks_dense
net = block.unit_fn(net, rate=1, **unit)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\venv_py311\Lib\site-packages\tf_slim\ops\arg_scope.py", line 184, in func_with_args
return func(*args, **current_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\venv_py311\Lib\site-packages\tf_slim\nets\resnet_v2.py", line 104, in bottleneck
preact = layers.batch_norm(
^^^^^^^^^^^^^^^^^^
File "\venv_py311\Lib\site-packages\tf_slim\ops\arg_scope.py", line 184, in func_with_args
return func(*args, **current_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\venv_py311\Lib\site-packages\tf_slim\layers\layers.py", line 663, in batch_norm
layer = normalization_layers.BatchNormalization(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\venv_py311\Lib\site-packages\tensorflow\python\layers\normalization.py", line 30, in getattr
return normalization.BatchNormalization
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\venv_py311\Lib\site-packages\tensorflow\python\util\lazy_loader.py", line 67, in getattr
module = self._load()
^^^^^^^^^^^^
File "\venv_py311\Lib\site-packages\tensorflow\python\util\lazy_loader.py", line 50, in load
module = importlib.import_module(self.name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\venv_py311\Lib\importlib_init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1126, in _find_and_load_unlocked
File "", line 241, in _call_with_frames_removed
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1140, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'tf_keras.legacy_tf_layers'
The text was updated successfully, but these errors were encountered: