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

Method set_input_record

caffe2/python/core.py:2119–2134  ·  view source on GitHub ↗
(self, input_record)

Source from the content-addressed store, hash-verified

2117 return [_get_blob_ref(x) for x in self._net.external_output]
2118
2119 def set_input_record(self, input_record):
2120 from caffe2.python import schema
2121 assert self._input_record is None or (input_record.has_blobs() and
2122 set(input_record.field_blobs()) ==
2123 set(self._input_record.field_blobs())), (
2124 'Input schema cannot be reset')
2125 if not input_record.has_blobs():
2126 with NameScope(self.Name()):
2127 self._input_record = schema.NewRecord(self, input_record)
2128 else:
2129 self._input_record = input_record
2130
2131 for blob in self._input_record.field_blobs():
2132 if not self.is_external_input(blob):
2133 self.AddExternalInput(blob)
2134 return self._input_record
2135
2136 def recover_input_record_by_prefix(self, prefix):
2137 """

Callers 7

generate_predict_netFunction · 0.95
generate_eval_netFunction · 0.95
clone_and_bind_netFunction · 0.80

Calls 6

NameMethod · 0.95
is_external_inputMethod · 0.95
AddExternalInputMethod · 0.95
NameScopeFunction · 0.85
has_blobsMethod · 0.45
field_blobsMethod · 0.45

Tested by 2