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)
def PackedFC(self, *args, **kwargs): return brew.packed_fc(self, *args, **kwargs)