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

Method _create_model

caffe2/python/workspace_test.py:635–648  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

633
634class TestPredictor(unittest.TestCase):
635 def _create_model(self):
636 m = model_helper.ModelHelper()
637 y = brew.fc(
638 m,
639 "data",
640 "y",
641 dim_in=4,
642 dim_out=2,
643 weight_init=("ConstantFill", dict(value=1.0)),
644 bias_init=("ConstantFill", dict(value=0.0)),
645 axis=0,
646 )
647 m.net.AddExternalOutput(y)
648 return m
649
650 # Use this test with a bigger model to see how using Predictor allows to
651 # avoid issues with low protobuf size limit in Python

Callers 1

Calls 1

AddExternalOutputMethod · 0.80

Tested by

no test coverage detected