示例#1
0
    def test_fc(self):
        m, n, k = (15, 15, 15)
        X = np.random.rand(m, k).astype(np.float32) - 0.5

        workspace.FeedBlob("x", X)
        model = ModelHelper(name="test_model")
        out = brew.fc(model, "x", "out_1", k, n)
        out = brew.packed_fc(model, out, "out_2", n, n)
        out = brew.fc_decomp(model, out, "out_3", n, n)
        out = brew.fc_prune(model, out, "out_4", n, n)

        workspace.RunNetOnce(model.param_init_net)
        workspace.RunNetOnce(model.net)
示例#2
0
 def PackedFC(self, *args, **kwargs):
     return brew.packed_fc(self, *args, **kwargs)
示例#3
0
文件: cnn.py 项目: Yangqing/caffe2
 def PackedFC(self, *args, **kwargs):
     return brew.packed_fc(self, *args, **kwargs)