Skip to content

tf.device("/cpu:0") inside the initialization. #130

Answered by keiohta
HesNobi asked this question in Q&A
Discussion options

You must be logged in to vote

tf2.x employs define-by-run interface that defines network shape by feeding data to the network.
Since tf2rl loads the saved weights at initialization of the Trainer class and input-output dimension can change depends on what env we want to use, defining network architecture before loading the weights enables fast check whether the saved weights match the input-output shape.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@HesNobi
Comment options

Answer selected by HesNobi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants