Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/lazyprogrammer/machine_learning_examples
/ predict
Method
predict
rl2/cartpole/pg_tf.py:109–111 ·
view source on GitHub ↗
(self, X)
Source
from the content-addressed store, hash-verified
107
)
108
109
def
predict(self, X):
110
X = np.atleast_2d(X)
111
return
self.session.run(self.predict_op, feed_dict={self.X: X})
112
113
def
sample_action(self, X):
114
p = self.predict(X)[0]
Callers
1
sample_action
Method · 0.95
Calls
1
run
Method · 0.45
Tested by
no test coverage detected