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

Method build

tensorflow/contrib/eager/python/metrics_impl.py:302–311  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

300 self.dtype = dtype
301
302 def build(self, *args, **kwargs):
303 # build() does not use call's arguments, by using *args, **kwargs
304 # we make it easier to inherit from Mean().
305 del args, kwargs
306 self.numer = self.add_variable(name="numer", shape=(),
307 dtype=self.dtype,
308 initializer=init_ops.zeros_initializer)
309 self.denom = self.add_variable(name="denom", shape=(),
310 dtype=self.dtype,
311 initializer=init_ops.zeros_initializer)
312
313 def call(self, values, weights=None):
314 """Accumulate statistics for computing the mean.

Callers 2

testBuildMeanMethod · 0.95
testSaveRestoreMethod · 0.95

Calls 1

add_variableMethod · 0.45

Tested by 2

testBuildMeanMethod · 0.76
testSaveRestoreMethod · 0.76