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

Function get_siamese_network

tests/models/test_model_save_graph.py:173–182  ·  view source on GitHub ↗

Create siamese network with shared base network as layer

(input_shape)

Source from the content-addressed store, hash-verified

171
172
173def get_siamese_network(input_shape):
174 """Create siamese network with shared base network as layer
175 """
176 base_layer = create_base_network(input_shape).as_layer()
177
178 ni_1 = Input(input_shape)
179 ni_2 = Input(input_shape)
180 nn_1 = base_layer(ni_1)
181 nn_2 = base_layer(ni_2)
182 return Model(inputs=[ni_1, ni_2], outputs=[nn_1, nn_2])
183
184
185class Reuse_ModelLayer_test(CustomTestCase):

Callers 1

test_saveMethod · 0.70

Calls 4

InputFunction · 0.85
ModelClass · 0.85
as_layerMethod · 0.80
create_base_networkFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…