MCPcopy Create free account
hub / github.com/lazyprogrammer/machine_learning_examples / predict

Function predict

pytorch/rl_trader.py:114–119  ·  view source on GitHub ↗
(model, np_states)

Source from the content-addressed store, hash-verified

112
113
114def predict(model, np_states):
115 with torch.no_grad():
116 inputs = torch.from_numpy(np_states.astype(np.float32))
117 output = model(inputs)
118 # print("output:", output)
119 return output.numpy()
120
121
122

Callers 2

actMethod · 0.70
replayMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected