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

Method test_fc

caffe2/python/brew_test.py:44–53  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

42 self.assertLess(abs(out.mean() - (1 - p)), 0.05)
43
44 def test_fc(self):
45 m, n, k = (15, 15, 15)
46 X = np.random.rand(m, k).astype(np.float32) - 0.5
47
48 workspace.FeedBlob("x", X)
49 model = ModelHelper(name="test_model")
50 brew.fc(model, "x", "out_1", k, n)
51 model.Validate()
52 workspace.RunNetOnce(model.param_init_net)
53 workspace.RunNetOnce(model.net)
54
55 def test_relu(self):
56 Xpos = np.ones((5, 5)).astype(np.float32) - 0.5

Callers

nothing calls this directly

Calls 4

ValidateMethod · 0.95
ModelHelperClass · 0.90
astypeMethod · 0.80
randMethod · 0.45

Tested by

no test coverage detected