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

Method __init__

caffe2/python/layers/batch_mse_loss.py:20–34  ·  view source on GitHub ↗
(self, model, input_record, name='batch_mse_loss', **kwargs)

Source from the content-addressed store, hash-verified

18class BatchMSELoss(ModelLayer):
19
20 def __init__(self, model, input_record, name='batch_mse_loss', **kwargs):
21 super().__init__(model, name, input_record, **kwargs)
22
23 assert schema.is_schema_subset(
24 schema.Struct(
25 ('label', schema.Scalar()),
26 ('prediction', schema.Scalar())
27 ),
28 input_record
29 )
30 self.tags.update([Tags.EXCLUDE_FROM_PREDICTION])
31
32 self.output_schema = schema.Scalar(
33 np.float32,
34 self.get_next_blob_reference('output'))
35
36 def add_ops(self, net):
37 prediction = self.input_record.prediction()

Callers

nothing calls this directly

Calls 2

updateMethod · 0.45

Tested by

no test coverage detected