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

Method set_output_record

caffe2/python/core.py:2145–2158  ·  view source on GitHub ↗
(self, record)

Source from the content-addressed store, hash-verified

2143 self.set_input_record(record)
2144
2145 def set_output_record(self, record):
2146 assert self._output_record is None or (record.has_blobs() and
2147 set(record.field_blobs()) ==
2148 set(self._output_record.field_blobs())), (
2149 'Output schema cannot be reset')
2150 for blob in record.field_blobs():
2151 assert self.BlobIsDefined(blob), "{} is not defined in net {}".format(
2152 blob,
2153 self.Proto()
2154 )
2155 for blob in record.field_blobs():
2156 if blob not in self.external_outputs:
2157 self.AddExternalOutput(blob)
2158 self._output_record = record
2159
2160 def recover_output_record_by_prefix(self, prefix):
2161 """

Callers 8

generate_predict_netFunction · 0.95
generate_eval_netFunction · 0.95
modify_netMethod · 0.80
modify_netMethod · 0.80
modify_netMethod · 0.80
modify_netMethod · 0.80

Calls 6

BlobIsDefinedMethod · 0.95
ProtoMethod · 0.95
AddExternalOutputMethod · 0.95
has_blobsMethod · 0.45
field_blobsMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected