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

Function reward_function

rl3/es_mnist.py:129–134  ·  view source on GitHub ↗
(params)

Source from the content-addressed store, hash-verified

127
128
129def reward_function(params):
130 model = ANN(D, M, K)
131 model.set_params(params)
132 # Ptrain = model.forward(Xtrain)
133 # return log_likelihood(Ytrain, Ptrain)
134 return model.score(Xtrain, Ytrain)
135
136
137

Callers

nothing calls this directly

Calls 3

set_paramsMethod · 0.95
scoreMethod · 0.95
ANNClass · 0.70

Tested by

no test coverage detected