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

Method build

tensorflow/python/keras/engine/base_layer.py:372–386  ·  view source on GitHub ↗

Creates the variables of the layer (optional, for subclass implementers). This is a method that implementers of subclasses of `Layer` or `Model` can override if they need a state-creation step in-between layer instantiation and layer call. This is typically used to create the weigh

(self, input_shape)

Source from the content-addressed store, hash-verified

370 self._initial_weights = None
371
372 def build(self, input_shape):
373 """Creates the variables of the layer (optional, for subclass implementers).
374
375 This is a method that implementers of subclasses of `Layer` or `Model`
376 can override if they need a state-creation step in-between
377 layer instantiation and layer call.
378
379 This is typically used to create the weights of `Layer` subclasses.
380
381 Arguments:
382 input_shape: Instance of `TensorShape`, or list of instances of
383 `TensorShape` if the layer expects a list of inputs
384 (one instance per input).
385 """
386 self.built = True
387
388 @doc_controls.for_subclass_implementers
389 def call(self, inputs, **kwargs): # pylint: disable=unused-argument

Callers 1

_maybe_buildMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected