MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / add

Method add

tensorflow/contrib/eager/python/network.py:551–561  ·  view source on GitHub ↗
(self, layer_func)

Source from the content-addressed store, hash-verified

549 self.add(l)
550
551 def add(self, layer_func):
552 if isinstance(layer_func, base.Layer):
553 args = function_utils.fn_args(layer_func.call)
554 self.track_layer(layer_func)
555 elif callable(layer_func):
556 args = function_utils.fn_args(layer_func)
557 else:
558 raise TypeError(
559 "Sequential.add() takes only tf.layers.Layer objects or callables; "
560 "not '%s' of type '%s'." % (layer_func, type(layer_func)))
561 self._layers_funcs.append((("training" in args), layer_func))
562
563 def call(self, inputs, training=None):
564 """Call each Layer in the order they were added."""

Callers 15

__init__Method · 0.95
testTwoLayersMethod · 0.95
testFunctionsMethod · 0.95
simple_sequential_modelFunction · 0.95
test_maskingMethod · 0.95
_create_modelMethod · 0.95
mainFunction · 0.95
get_modelFunction · 0.95
_getSequentialModelMethod · 0.95

Calls 3

typeFunction · 0.85
track_layerMethod · 0.80
appendMethod · 0.45

Tested by 15

testTwoLayersMethod · 0.76
testFunctionsMethod · 0.76
simple_sequential_modelFunction · 0.76
test_maskingMethod · 0.76
_create_modelMethod · 0.76
_getSequentialModelMethod · 0.76
test_mpi_allreduceMethod · 0.36
bodyMethod · 0.36