def test_squeezenet(): shape = {"data": (1, 3, 224, 224)} for version in ['1.0', '1.1']: mx_sym = model_zoo.mx_squeezenet(version) mod, _ = relay.frontend.from_mxnet(mx_sym, shape) relay_mod = model_zoo.relay_squeezenet(version) compare_graph(mod, relay_mod)
def test_squeezenet(): shape = {"data": (1, 3, 224, 224)} for version in ['1.0', '1.1']: mx_sym = model_zoo.mx_squeezenet(version) from_mx_sym, _ = relay.frontend.from_mxnet(mx_sym, shape) relay_sym = model_zoo.relay_squeezenet(version) compare_graph(from_mx_sym, relay_sym)
def test_squeeze_net(): shape_dict = {'data': (1, 3, 224, 224)} dtype_dict = {'data': 'float32'} mod, _, = relay.frontend.from_caffe2(c2_squeezenet.init_net, c2_squeezenet.predict_net, shape_dict, dtype_dict) relay_func, _ = relay_squeezenet() compare_graph(mod[mod.entry_func], relay_func)
def test_squeeze_net(): shape_dict = {"data": (1, 3, 224, 224)} dtype_dict = {"data": "float32"} mod, _, = relay.frontend.from_caffe2(c2_squeezenet.init_net, c2_squeezenet.predict_net, shape_dict, dtype_dict) relay_mod, _ = relay_squeezenet() compare_graph(mod, relay_mod)
def test_squeeze_net(): shape_dict = {'data': (1, 3, 224, 224)} dtype_dict = {'data': 'float32'} from_c2_func, _ = relay.frontend.from_caffe2(c2_squeezenet.init_net, c2_squeezenet.predict_net, shape_dict, dtype_dict) relay_func, _ = relay_squeezenet() compare_graph(from_c2_func, relay_func)