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

Method get_config

tensorflow/python/keras/engine/sequential.py:332–353  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

330 return (proba > 0.5).astype('int32')
331
332 def get_config(self):
333 layer_configs = []
334 for layer in self.layers:
335 layer_configs.append({
336 'class_name': layer.__class__.__name__,
337 'config': layer.get_config()
338 })
339 # When constructed using an `InputLayer` the first non-input layer may not
340 # have the shape information to reconstruct `Sequential` as a graph network.
341 if (self._is_graph_network and layer_configs and
342 'batch_input_shape' not in layer_configs[0]['config'] and
343 isinstance(self._layers[0], input_layer.InputLayer)):
344 batch_input_shape = self._layers[0]._batch_input_shape
345 layer_configs[0]['config']['batch_input_shape'] = batch_input_shape
346
347 config = {
348 'name': self.name,
349 'layers': copy.deepcopy(layer_configs)
350 }
351 if self._build_input_shape:
352 config['build_input_shape'] = self._build_input_shape
353 return config
354
355 @classmethod
356 def from_config(cls, config, custom_objects=None):

Callers 4

layer_testFunction · 0.95
test_bidirectionalMethod · 0.95

Calls 1

appendMethod · 0.45

Tested by 4

layer_testFunction · 0.76
test_bidirectionalMethod · 0.76