RL_trader
RL_trader copied to clipboard
Hello! Please help me figure it out. Thank you
When loading the saved model in trader.py , it throws the following error:
ValueError: Could not find matching function to call loaded from the SavedModel. Got: Positional arguments (2 total): * TimeStep(step_type=<tf.Tensor 'time_step:0' shape=(1,) dtype=int32>, reward=<tf.Tensor 'time_step_1:0' shape=(1,) dtype=float32>, discount=<tf.Tensor 'time_step_2:0' shape=(1,) dtype=float32>, observation=<tf.Tensor 'time_step_3:0' shape=(1, 26) dtype=float32>) * () Keyword arguments: {}
Expected these arguments to match one of the following 2 option(s):
Option 1: Positional arguments (2 total): * TimeStep(step_type=TensorSpec(shape=(None,), dtype=tf.int32, name='step_type'), reward=TensorSpec(shape=(None,), dtype=tf.float32, name='reward'), discount=TensorSpec(shape=(None,), dtype=tf.float32, name='discount'), observation=TensorSpec(shape=(None, 61), dtype=tf.float32, name='observation')) * () Keyword arguments: {}
Option 2: Positional arguments (2 total): * TimeStep(step_type=TensorSpec(shape=(None,), dtype=tf.int32, name='time_step/step_type'), reward=TensorSpec(shape=(None,), dtype=tf.float32, name='time_step/reward'), discount=TensorSpec(shape=(None,), dtype=tf.float32, name='time_step/discount'), observation=TensorSpec(shape=(None, 61), dtype=tf.float32, name='time_step/observation')) * () Keyword arguments: {}
I am not sure what's happening here, best guess is that the current model tensor shape has changed from the one you have saved