Return the blob that has not been defined or registered in the current net. It returns `BlobReference(prefix)`, if it's valid, otherwise `BlobReference(prefix) + '_auto_' + ?`. Different calls is guaranteed to return blob with different names.
(self, prefix='unnamed')
| 1949 | return self.NextBlob(output_blob_base) |
| 1950 | |
| 1951 | def NextBlob(self, prefix='unnamed'): |
| 1952 | """Return the blob that has not been defined or registered in the |
| 1953 | current net. It returns `BlobReference(prefix)`, if it's valid, |
| 1954 | otherwise `BlobReference(prefix) + '_auto_' + ?`. Different calls |
| 1955 | is guaranteed to return blob with different names.""" |
| 1956 | output_blob_base = BlobReference(prefix) |
| 1957 | output_blob = output_blob_base |
| 1958 | index = 0 |
| 1959 | while str(output_blob) in self._registered_blob_names or ( |
| 1960 | self.BlobIsDefined(output_blob)): |
| 1961 | output_blob = output_blob_base + '_auto_' + str(index) |
| 1962 | index += 1 |
| 1963 | |
| 1964 | self._registered_blob_names.add(str(output_blob)) |
| 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 |