Hello, I cannot predict with my model on Apple M1. I get a error:
Traceback (most recent call last):
File "/Users/martin/Documents/Projects/rl-toolkit/rl_toolkit/__main__.py", line 154, in <module>
agent.run()
File "/Users/martin/Documents/Projects/rl-toolkit/rl_toolkit/training.py", line 213, in run
losses = self._train(sample)
File "/Users/martin/miniforge3/lib/python3.9/site-packages/tensorflow/python/eager/def_function.py", line 889, in __call__
result = self._call(*args, **kwds)
File "/Users/martin/miniforge3/lib/python3.9/site-packages/tensorflow/python/eager/def_function.py", line 950, in _call
return self._stateless_fn(*args, **kwds)
File "/Users/martin/miniforge3/lib/python3.9/site-packages/tensorflow/python/eager/function.py", line 3023, in __call__
return graph_function._call_flat(
File "/Users/martin/miniforge3/lib/python3.9/site-packages/tensorflow/python/eager/function.py", line 1960, in _call_flat
return self._build_call_outputs(self._inference_function.call(
File "/Users/martin/miniforge3/lib/python3.9/site-packages/tensorflow/python/eager/function.py", line 591, in call
outputs = execute.execute(
File "/Users/martin/miniforge3/lib/python3.9/site-packages/tensorflow/python/eager/execute.py", line 59, in quick_execute
tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot assign a device for operation ReadVariableOp: Could not satisfy explicit device specification '' because the node {{colocation_node ReadVariableOp}} was colocated with a group of nodes that required incompatible device '/job:localhost/replica:0/task:0/device:GPU:0'. All available devices [/job:localhost/replica:0/task:0/device:CPU:0, /job:localhost/replica:0/task:0/device:GPU:0].
Colocation Debug Info:
Colocation group had the following types and supported devices:
Root Member(assigned_device_name_index_=2 requested_device_name_='/job:localhost/replica:0/task:0/device:GPU:0' assigned_device_name_='/job:localhost/replica:0/task:0/device:GPU:0' resource_device_name_='/job:localhost/replica:0/task:0/device:GPU:0' supported_device_types_=[CPU] possible_devices_=[]
ResourceApplyAdamWithAmsgrad: CPU
ReadVariableOp: GPU CPU
_Arg: GPU CPU
Colocation members, user-requested devices, and framework assigned devices, if any:
readvariableop_resource (_Arg) framework assigned device=/job:localhost/replica:0/task:0/device:GPU:0
adam_2_adam_update_6_resourceapplyadamwithamsgrad_m (_Arg) framework assigned device=/job:localhost/replica:0/task:0/device:GPU:0
adam_2_adam_update_6_resourceapplyadamwithamsgrad_v (_Arg) framework assigned device=/job:localhost/replica:0/task:0/device:GPU:0
adam_2_adam_update_6_resourceapplyadamwithamsgrad_vhat (_Arg) framework assigned device=/job:localhost/replica:0/task:0/device:GPU:0
ReadVariableOp (ReadVariableOp)
Exp/ReadVariableOp (ReadVariableOp)
ReadVariableOp_1 (ReadVariableOp)
actor/ReadVariableOp (ReadVariableOp)
actor/Exp/ReadVariableOp (ReadVariableOp)
actor/ReadVariableOp_1 (ReadVariableOp)
actor_critic/actor/ReadVariableOp (ReadVariableOp)
actor_critic/actor/Exp/ReadVariableOp (ReadVariableOp)
actor_critic/actor/ReadVariableOp_1 (ReadVariableOp)
Adam_2/Adam/update_6/ResourceApplyAdamWithAmsgrad (ResourceApplyAdamWithAmsgrad) /job:localhost/replica:0/task:0/device:GPU:0
[[{{node ReadVariableOp}}]] [Op:__inference__train_4206]