MCPcopy
hub / github.com/tensorlayer/TensorLayer / mlp

Function mlp

examples/database/task_script.py:18–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16
17# define the network
18def mlp():
19 ni = tl.layers.Input([None, 784], name='input')
20 net = tl.layers.Dropout(keep=0.8, name='drop1')(ni)
21 net = tl.layers.Dense(n_units=n_units1, act=tf.nn.relu, name='relu1')(net)
22 net = tl.layers.Dropout(keep=0.5, name='drop2')(net)
23 net = tl.layers.Dense(n_units=n_units2, act=tf.nn.relu, name='relu2')(net)
24 net = tl.layers.Dropout(keep=0.5, name='drop3')(net)
25 net = tl.layers.Dense(n_units=10, act=None, name='output')(net)
26 M = tl.models.Model(inputs=ni, outputs=net)
27 return M
28
29
30network = mlp()

Callers 1

task_script.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected