MCPcopy Index your code
hub / github.com/tensorlayer/TensorLayer / get_model

Function get_model

tests/models/test_model_save_graph.py:56–68  ·  view source on GitHub ↗
(inputs_shape)

Source from the content-addressed store, hash-verified

54
55
56def get_model(inputs_shape):
57 ni = Input(inputs_shape)
58 nn = Dropout(keep=0.8)(ni)
59 nn = Dense(n_units=800, act=tf.nn.relu,
60 in_channels=784)(nn) # in_channels is optional in this case as it can be inferred by the previous layer
61 nn = Dropout(keep=0.8)(nn)
62 nn = Dense(n_units=800, act=tf.nn.relu,
63 in_channels=800)(nn) # in_channels is optional in this case as it can be inferred by the previous layer
64 nn = Dropout(keep=0.8)(nn)
65 nn = Dense(n_units=10, act=tf.nn.relu,
66 in_channels=800)(nn) # in_channels is optional in this case as it can be inferred by the previous layer
67 M = Model(inputs=ni, outputs=nn)
68 return M
69
70
71class Model_Save_with_weights(CustomTestCase):

Callers 3

test_saveMethod · 0.70
test_net1Method · 0.50
test_STNMethod · 0.50

Calls 4

InputFunction · 0.85
DropoutClass · 0.85
DenseClass · 0.85
ModelClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…