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
During training only values between 0 and 1 are chosen.
However, when i export the Agent with
exportONNXNetwork(layerGraph(actorNetwork),'actorNet_test.onnx')
and load it into a python-script with policy = rt.InferenceSession("actorNet_test.onnx")
I get a negative output for the input
The evaluate_Policy function also expects an Input of shape [2 1 1], while the onnx-imported-model expects the shape[1,1,2,1].
I have used reshape-functions to reshape the data [-0.1515581,1] to the corresponding shape and then evaluate the two functions:
evaluatePolicy(reshape([-0.1515581,1],2,1,1))
which returns -1
My question is, why do the two outputs differ, eventhough they were generated from the same agent and also why do the two Policy-models expect different shapes?
Grateful for any tip. Currently I can deploy a trained Net on a raspberry, however i would like to have outputs which correspond (at the moment they don't).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Dear Onnxruntime Team,
I have a Matlab defined RL-algorithm with an DDPG-agent which can chose values between 0 and 1.
This is defined in the Agent-definition through:
During training only values between 0 and 1 are chosen.
However, when i export the Agent with
exportONNXNetwork(layerGraph(actorNetwork),'actorNet_test.onnx')
and load it into a python-script with
policy = rt.InferenceSession("actorNet_test.onnx")
I get a negative output for the input
.
Also when I use the Agent to generate a Policy according to Matlab (see https://www.mathworks.com/help/reinforcement-learning/ref/rl.agent.rldqnagent.generatepolicyfunction.html)
and evaluate the function with the same input_data, I also recieve negative values, but not the same as returned by the onnx-model.
The evaluate_Policy function also expects an Input of shape [2 1 1], while the onnx-imported-model expects the shape[1,1,2,1].
I have used reshape-functions to reshape the data [-0.1515581,1] to the corresponding shape and then evaluate the two functions:
evaluatePolicy(reshape([-0.1515581,1],2,1,1))
which returns -1
and
which returns -0.0076.
My question is, why do the two outputs differ, eventhough they were generated from the same agent and also why do the two Policy-models expect different shapes?
Grateful for any tip. Currently I can deploy a trained Net on a raspberry, however i would like to have outputs which correspond (at the moment they don't).
BR,
V
Beta Was this translation helpful? Give feedback.
All reactions