MCPcopy Create free account
hub / github.com/pytorch/pytorch / __init__

Method __init__

caffe2/python/schema.py:292–298  ·  view source on GitHub ↗
(self, values, lengths_blob=None, evicted_values=None)

Source from the content-addressed store, hash-verified

290 __slots__: Sequence[str] = ("_evicted_values",)
291
292 def __init__(self, values, lengths_blob=None, evicted_values=None):
293 if isinstance(evicted_values, Field):
294 assert isinstance(evicted_values, Scalar)
295 self._evicted_values = _normalize_field(evicted_values)
296 else:
297 self._evicted_values = Scalar(np.int64, evicted_values)
298 super().__init__(values, lengths_blob=lengths_blob)
299
300 def field_names(self):
301 value_fields = self._items.field_names()

Callers

nothing calls this directly

Calls 4

isinstanceFunction · 0.85
_normalize_fieldFunction · 0.85
ScalarClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected