MCPcopy Index your code
hub / github.com/pytorch/pytorch / NextName

Method NextName

caffe2/python/core.py:1967–1986  ·  view source on GitHub ↗

Returns the next name to be used, if you do not want to explicitly name your blob. [Deprecated, use NextBlob, NextScopedBlob instead]

(self, prefix=None, output_id=None)

Source from the content-addressed store, hash-verified

1965 return output_blob
1966
1967 def NextName(self, prefix=None, output_id=None):
1968 """Returns the next name to be used, if you do not want to explicitly
1969 name your blob. [Deprecated, use NextBlob, NextScopedBlob instead]"""
1970 if prefix:
1971 output_name_base = self._net.name + '/' + prefix
1972 output_name = output_name_base
1973 if output_id is not None:
1974 output_name += ':' + str(output_id)
1975 key = output_name
1976 index = self._next_blob_name_ids.get(key, 2)
1977 while self.BlobIsDefined(str(ScopedBlobReference(output_name))):
1978 output_name = output_name_base + '_' + str(index)
1979 if output_id is not None:
1980 output_name += ':' + str(output_id)
1981 index += 1
1982 self._next_blob_name_ids[key] = index
1983 else:
1984 output_name = self._net.name + '_blob_' + str(self._next_name_index)
1985 self._next_name_index += 1
1986 return str(output_name)
1987
1988 def _ExtendOps(self, new_ops):
1989 self._net.op.extend(new_ops)

Callers 15

LogInfoMethod · 0.95
_CreateAndAddToSelfMethod · 0.95
__init__Method · 0.95
test_safe_blobs_queueMethod · 0.95
enqueueFunction · 0.80
dequeueFunction · 0.80
recurrent_netFunction · 0.80
write_record_exMethod · 0.80
__init__Method · 0.80
__init__Method · 0.80
stop_blobMethod · 0.80

Calls 3

BlobIsDefinedMethod · 0.95
ScopedBlobReferenceFunction · 0.85
getMethod · 0.45

Tested by 2

test_safe_blobs_queueMethod · 0.76