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

Problems running the code #1

Open
moowees opened this issue Nov 3, 2023 · 1 comment
Open

Problems running the code #1

moowees opened this issue Nov 3, 2023 · 1 comment

Comments

@moowees
Copy link

moowees commented Nov 3, 2023

Hi,
i have problems running the code. Seems to be soething with tensorflow. Have you had this issue?

2023-11-03 10:42:15.612564: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: SSE SSE2 SSE3 SSE4.1 SSE4.2 AVX AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
INFO:root:TensorFlow version: 2.14.0
INFO:root:Eager execution: True
INFO:root:MPC parameters:
INFO:root:	H:	5
INFO:root:	tau:	0.2
Traceback (most recent call last):
  File "E:\PINNs-based-MPC-1.0.0\src\main.py", line 56, in <module>
    pinn.load_weights(weights_path)
  File "E:\PINNs-based-MPC-1.0.0\src\model\nn.py", line 265, in load_weights
    self.model.load_weights(tf.train.latest_checkpoint(path))
  File "E:\PINNs-based-MPC-1.0.0\venv\lib\site-packages\tensorflow\python\keras\engine\training.py", line 2317, in load_weights
    status = self._checkpoint.read(filepath, options)
  File "E:\PINNs-based-MPC-1.0.0\venv\lib\site-packages\tensorflow\python\checkpoint\checkpoint.py", line 2540, in read
    result = self._saver.restore(save_path=save_path, options=options)
  File "E:\PINNs-based-MPC-1.0.0\venv\lib\site-packages\tensorflow\python\checkpoint\checkpoint.py", line 1461, in restore
    restore_lib.CheckpointPosition(
  File "E:\PINNs-based-MPC-1.0.0\venv\lib\site-packages\tensorflow\python\checkpoint\restore.py", line 62, in restore
    restore_ops = self._restore_descendants(reader)
  File "E:\PINNs-based-MPC-1.0.0\venv\lib\site-packages\tensorflow\python\checkpoint\restore.py", line 459, in _restore_descendants
    _queue_children_for_restoration(current_position, visit_queue)
  File "E:\PINNs-based-MPC-1.0.0\venv\lib\site-packages\tensorflow\python\checkpoint\restore.py", line 606, in _queue_children_for_restoration
    local_object = trackable._lookup_dependency(child.local_name,
TypeError: _lookup_dependency() takes 2 positional arguments but 3 were given
WARNING:tensorflow:Detecting that an object or model or tf.train.Checkpoint is being deleted with unrestored values. See the following logs for the specific values in question. To silence these warnings, use `status.expect_partial()`. See https://www.tensorflow.org/api_docs/python/tf/train/Checkpoint#restorefor details about the status object returned by the restore function.
WARNING:tensorflow:Detecting that an object or model or tf.train.Checkpoint is being deleted with unrestored values. See the following logs for the specific values in question. To silence these warnings, use `status.expect_partial()`. See https://www.tensorflow.org/api_docs/python/tf/train/Checkpoint#restorefor details about the status object returned by the restore function.
WARNING:tensorflow:Value in checkpoint could not be found in the restored object: (root).layer_with_weights-0.kernel
WARNING:tensorflow:Value in checkpoint could not be found in the restored object: (root).layer_with_weights-0.kernel
WARNING:tensorflow:Value in checkpoint could not be found in the restored object: (root).layer_with_weights-0.bias
WARNING:tensorflow:Value in checkpoint could not be found in the restored object: (root).layer_with_weights-0.bias
WARNING:tensorflow:Value in checkpoint could not be found in the restored object: (root).layer_with_weights-1.kernel
WARNING:tensorflow:Value in checkpoint could not be found in the restored object: (root).layer_with_weights-1.kernel
WARNING:tensorflow:Value in checkpoint could not be found in the restored object: (root).layer_with_weights-1.bias
WARNING:tensorflow:Value in checkpoint could not be found in the restored object: (root).layer_with_weights-1.bias
WARNING:tensorflow:Value in checkpoint could not be found in the restored object: (root).layer_with_weights-2.kernel
WARNING:tensorflow:Value in checkpoint could not be found in the restored object: (root).layer_with_weights-2.kernel
WARNING:tensorflow:Value in checkpoint could not be found in the restored object: (root).layer_with_weights-2.bias
WARNING:tensorflow:Value in checkpoint could not be found in the restored object: (root).layer_with_weights-2.bias
WARNING:tensorflow:Value in checkpoint could not be found in the restored object: (root).layer_with_weights-3.kernel
WARNING:tensorflow:Value in checkpoint could not be found in the restored object: (root).layer_with_weights-3.kernel
WARNING:tensorflow:Value in checkpoint could not be found in the restored object: (root).layer_with_weights-3.bias
WARNING:tensorflow:Value in checkpoint could not be found in the restored object: (root).layer_with_weights-3.bias
WARNING:tensorflow:Value in checkpoint could not be found in the restored object: (root).layer_with_weights-4.kernel
WARNING:tensorflow:Value in checkpoint could not be found in the restored object: (root).layer_with_weights-4.kernel
WARNING:tensorflow:Value in checkpoint could not be found in the restored object: (root).layer_with_weights-4.bias
WARNING:tensorflow:Value in checkpoint could not be found in the restored object: (root).layer_with_weights-4.bias

Best Regards

@Jonas-Nicodemus
Copy link
Owner

Hi, I updated the requirements.txt to fixed versions. Can you try to run it again with those versions? And I think you should use python 3.9 if possible.

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

2 participants