seungjaeryanlee / agents

TF-Agents is a library for Reinforcement Learning in TensorFlow
Apache License 2.0
1 stars 0 forks source link

ValueError: Not the same graph #1

Closed seungjaeryanlee closed 5 years ago

seungjaeryanlee commented 5 years ago

I successfully converted observation spec from BoundedArraySpec to BoundedTensorSpec! However, I get a ValueError when I try to run train_eval_rnd.py:

ValueError: Tensor("RNDNetwork/EncodingNetwork/EncodingNetwork/dense/kernel/Read/ReadVariableOp:0", 
shape=(4, 100), dtype=float32) must be from the same graph as 
Tensor("RNDNetwork/EncodingNetwork/flatten/Reshape:0", shape=(1, 4), dtype=float32).

(4 is the state dimension of CartPole, and 100 is the size of the fully connected layer.)

@oars @mandroid6 Do you have any suggestions on where I should pay attention to? I have been trying a few things but none of them fixed the issue. I am having trouble understanding why the tensors from the same network would be in different graphs.

Here is the full output: output.txt

mandroid6 commented 5 years ago

@seungjaeryanlee usually the graph on which the model/network has been created needs to be the same as the graph used for prediction/eval.