MCPcopy Create free account
hub / github.com/apache/singa / __new__

Method __new__

examples/cnn_ms/pkg_model_code/model.py:98–103  ·  view source on GitHub ↗
(cls, name, bases, attr)

Source from the content-addressed store, hash-verified

96 return wrapper
97
98 def __new__(cls, name, bases, attr):
99 if 'train_one_batch' in attr:
100 attr['train_one_batch'] = ModelMeta.buffer_operation(
101 attr['train_one_batch'])
102
103 return super(ModelMeta, cls).__new__(cls, name, bases, attr)
104
105
106class Model(layer.Layer, metaclass=ModelMeta):

Callers

nothing calls this directly

Calls 1

buffer_operationMethod · 0.45

Tested by

no test coverage detected