diff --git a/nnvm/example/src/operator.cc b/nnvm/example/src/operator.cc index 70063e4c4000..b27fe0b15635 100644 --- a/nnvm/example/src/operator.cc +++ b/nnvm/example/src/operator.cc @@ -98,7 +98,6 @@ NNVM_REGISTER_OP(__add_symbol__) NNVM_REGISTER_OP(exp) .describe("take exponential") .set_num_inputs(1) -.attr("inplace_pair", std::make_pair(0, 0)) .attr("FInferShape", SameShape); NNVM_REGISTER_OP(cross_device_copy) diff --git a/nnvm/tests/python/test_graph.py b/nnvm/tests/python/test_graph.py index 787e0ae78e14..53714b1ae018 100644 --- a/nnvm/tests/python/test_graph.py +++ b/nnvm/tests/python/test_graph.py @@ -49,20 +49,6 @@ def test_infer_shape(): assert g.json_attr('shape')[jnode_row_ptr[nindex["reshape1"]]] == [2, 4] assert g.json_attr('shape')[jnode_row_ptr[nindex["add1"]]] == [4, 2] -def test_infer_shape(): - x = sym.Variable('x', shape=(4, 2)) - y = sym.add(x, x, name='add1') - y = sym.reshape(y, target=(2, 4), name="reshape1") - g = graph.create(y) - g._set_json_attr("shape_attr_key", "shape") - g = g.apply('InferShape') - jgraph = json.loads(g.apply('SaveJSON').json_attr('json')) - jnodes = jgraph['nodes'] - jnode_row_ptr = jgraph['node_row_ptr'] - nindex = {n['name']: i for i, n in enumerate(jnodes)} - assert g.json_attr('shape')[jnode_row_ptr[nindex["reshape1"]]] == [2, 4] - assert g.json_attr('shape')[jnode_row_ptr[nindex["add1"]]] == [4, 2] - def test_infer_type(): x = sym.Variable('x') y = sym.add(x, x, name='add1')