[RLlib] Add testing framework_iterator. (#7852)

* Add testing framework_iterator.

* LINT.

* WIP.

* Fix and LINT.

* LINT fix.
This commit is contained in:
Sven Mika
2020-04-03 12:24:25 -07:00
committed by GitHub
parent bb6c675231
commit 1d4823c0ec
15 changed files with 323 additions and 303 deletions
+1 -1
View File
@@ -135,7 +135,7 @@ def fc(x, weights, biases=None):
isinstance(weights, torch.Tensor) else weights
biases = biases.detach().numpy() if \
isinstance(biases, torch.Tensor) else biases
if tf:
if tf and tf.executing_eagerly():
x = x.numpy() if isinstance(x, tf.Variable) else x
weights = weights.numpy() if isinstance(weights, tf.Variable) else \
weights