MCPcopy Index your code
hub / github.com/rushter/MLAlgorithms / mlp_model

Function mlp_model

examples/rl_deep_q_learning.py:11–21  ·  view source on GitHub ↗
(n_actions, batch_size=64)

Source from the content-addressed store, hash-verified

9
10
11def mlp_model(n_actions, batch_size=64):
12 model = NeuralNet(
13 layers=[Dense(32), Activation("relu"), Dense(n_actions)],
14 loss="mse",
15 optimizer=Adam(),
16 metric="mse",
17 batch_size=batch_size,
18 max_epochs=1,
19 verbose=False,
20 )
21 return model
22
23
24model = DQN(n_episodes=2500, batch_size=64)

Callers

nothing calls this directly

Calls 4

NeuralNetClass · 0.90
DenseClass · 0.90
ActivationClass · 0.90
AdamClass · 0.90

Tested by

no test coverage detected