def test_resnet():
    shape = {"data": (1, 3, 224, 224)}
    for n in [18, 34, 50, 101]:
        mx_sym = model_zoo.mx_resnet(n)
        mod, _ = relay.frontend.from_mxnet(mx_sym, shape=shape)
        relay_mod = model_zoo.relay_resnet(n)
        compare_graph(mod, relay_mod)
Example #2
0
def test_resnet():
    shape = {"data": (1, 3, 224, 224)}
    for n in [18, 34, 50, 101]:
        mx_sym = model_zoo.mx_resnet(n)
        from_mx_sym, _ = relay.frontend.from_mxnet(mx_sym, shape=shape)
        relay_sym = model_zoo.relay_resnet(n)
        compare_graph(from_mx_sym, relay_sym)