Skip to content

Instantly share code, notes, and snippets.

@jamesr66a
Created October 5, 2018 19:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesr66a/3c4227acdf28bf4841620c2308c2b25b to your computer and use it in GitHub Desktop.
Save jamesr66a/3c4227acdf28bf4841620c2308c2b25b to your computer and use it in GitHub Desktop.
======================================================================
FAIL: test_alexnet (__main__.TestJit)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_jit.py", line 1361, in test_alexnet
self.assertExpectedGraph(trace)
File "test/test_jit.py", line 266, in assertExpectedGraph
self.assertExpected(str(graph), *args, **kwargs)
File "/Users/jamesreed/onnx-fairseq/pytorch/test/common.py", line 551, in assertExpected
self.assertMultiLineEqual(expected, s)
AssertionError: 'grap[1050 chars]23 : int = prim::Constant[value=0](), scope: A[4368 chars]n}\n' != 'grap[1050 chars]23 : bool = prim::Constant[value=0](), scope: [4546 chars]n}\n'
graph(%0 : Double(1, 3, 224, 224)
%1 : Double(64, 3, 11, 11)
%2 : Double(64)
%3 : Double(192, 64, 5, 5)
%4 : Double(192)
%5 : Double(384, 192, 3, 3)
%6 : Double(384)
%7 : Double(256, 384, 3, 3)
%8 : Double(256)
%9 : Double(256, 256, 3, 3)
%10 : Double(256)
%11 : Double(4096, 9216)
%12 : Double(4096)
%13 : Double(4096, 4096)
%14 : Double(4096)
%15 : Double(1000, 4096)
%16 : Double(1000)) {
%17 : int = prim::Constant[value=4](), scope: AlexNet/Sequential[features]/Conv2d[0]
%18 : int[] = prim::ListConstruct(%17, %17), scope: AlexNet/Sequential[features]/Conv2d[0]
%19 : int = prim::Constant[value=2](), scope: AlexNet/Sequential[features]/Conv2d[0]
%20 : int[] = prim::ListConstruct(%19, %19), scope: AlexNet/Sequential[features]/Conv2d[0]
%21 : int = prim::Constant[value=1](), scope: AlexNet/Sequential[features]/Conv2d[0]
%22 : int[] = prim::ListConstruct(%21, %21), scope: AlexNet/Sequential[features]/Conv2d[0]
+ %23 : bool = prim::Constant[value=0](), scope: AlexNet/Sequential[features]/Conv2d[0]
- %23 : int = prim::Constant[value=0](), scope: AlexNet/Sequential[features]/Conv2d[0]
? ^
+ %24 : int = prim::Constant[value=0](), scope: AlexNet/Sequential[features]/Conv2d[0]
? ^
- %24 : int[] = prim::ListConstruct(%23, %23), scope: AlexNet/Sequential[features]/Conv2d[0]
? ^ ^ ^
+ %25 : int[] = prim::ListConstruct(%24, %24), scope: AlexNet/Sequential[features]/Conv2d[0]
? ^ ^ ^
+ %26 : bool = prim::Constant[value=1](), scope: AlexNet/Sequential[features]/Conv2d[0]
- %25 : Double(1, 64, 55, 55) = aten::_convolution(%0, %1, %2, %18, %20, %22, %23, %24, %21, %23, %23, %21), scope: AlexNet/Sequential[features]/Conv2d[0]
? ^ ^ ^
+ %27 : Double(1, 64, 55, 55) = aten::_convolution(%0, %1, %2, %18, %20, %22, %23, %25, %21, %23, %23, %26), scope: AlexNet/Sequential[features]/Conv2d[0]
? ^ ^ ^
- %26 : Double(1, 64, 55, 55) = aten::threshold(%25, %23, %23), scope: AlexNet/Sequential[features]/ReLU[1]
? ^ ^ ^ ^
+ %28 : Double(1, 64, 55, 55) = aten::threshold(%27, %24, %24), scope: AlexNet/Sequential[features]/ReLU[1]
? ^ ^ ^ ^
- %27 : int = prim::Constant[value=3](), scope: AlexNet/Sequential[features]/MaxPool2d[2]
? ^
+ %29 : int = prim::Constant[value=3](), scope: AlexNet/Sequential[features]/MaxPool2d[2]
? ^
- %28 : int[] = prim::ListConstruct(%27, %27), scope: AlexNet/Sequential[features]/MaxPool2d[2]
? ^^ ^ ^
+ %30 : int[] = prim::ListConstruct(%29, %29), scope: AlexNet/Sequential[features]/MaxPool2d[2]
? ^^ ^ ^
- %29 : Double(1, 64, 27, 27), %30 : Long(1, 64, 27, 27) = aten::max_pool2d_with_indices(%26, %28, %20, %24, %22, %23), scope: AlexNet/Sequential[features]/MaxPool2d[2]
? ^^ ^ ----- ^
+ %31 : Double(1, 64, 27, 27), %32 : Long(1, 64, 27, 27) = aten::max_pool2d_with_indices(%28, %30, %20, %25, %22, %23), scope: AlexNet/Sequential[features]/MaxPool2d[2]
? ^^ ^ +++++ ^
- %31 : Double(1, 192, 27, 27) = aten::_convolution(%29, %3, %4, %22, %20, %22, %23, %24, %21, %23, %23, %21), scope: AlexNet/Sequential[features]/Conv2d[3]
? ^ ^^ ^ ^
+ %33 : Double(1, 192, 27, 27) = aten::_convolution(%31, %3, %4, %22, %20, %22, %23, %25, %21, %23, %23, %26), scope: AlexNet/Sequential[features]/Conv2d[3]
? ^ ^^ ^ ^
- %32 : Double(1, 192, 27, 27) = aten::threshold(%31, %23, %23), scope: AlexNet/Sequential[features]/ReLU[4]
? ^ ^ ^ ^
+ %34 : Double(1, 192, 27, 27) = aten::threshold(%33, %24, %24), scope: AlexNet/Sequential[features]/ReLU[4]
? ^ ^ ^ ^
- %33 : Double(1, 192, 13, 13), %34 : Long(1, 192, 13, 13) = aten::max_pool2d_with_indices(%32, %28, %20, %24, %22, %23), scope: AlexNet/Sequential[features]/MaxPool2d[5]
? ^ ^ ^ ^^ ^
+ %35 : Double(1, 192, 13, 13), %36 : Long(1, 192, 13, 13) = aten::max_pool2d_with_indices(%34, %30, %20, %25, %22, %23), scope: AlexNet/Sequential[features]/MaxPool2d[5]
? ^ ^ ^ ^^ ^
- %35 : Double(1, 384, 13, 13) = aten::_convolution(%33, %5, %6, %22, %22, %22, %23, %24, %21, %23, %23, %21), scope: AlexNet/Sequential[features]/Conv2d[6]
? ^ ^ ^ ^
+ %37 : Double(1, 384, 13, 13) = aten::_convolution(%35, %5, %6, %22, %22, %22, %23, %25, %21, %23, %23, %26), scope: AlexNet/Sequential[features]/Conv2d[6]
? ^ ^ ^ ^
- %36 : Double(1, 384, 13, 13) = aten::threshold(%35, %23, %23), scope: AlexNet/Sequential[features]/ReLU[7]
? ^ ^ ^ ^
+ %38 : Double(1, 384, 13, 13) = aten::threshold(%37, %24, %24), scope: AlexNet/Sequential[features]/ReLU[7]
? ^ ^ ^ ^
- %37 : Double(1, 256, 13, 13) = aten::_convolution(%36, %7, %8, %22, %22, %22, %23, %24, %21, %23, %23, %21), scope: AlexNet/Sequential[features]/Conv2d[8]
? ^ ^ ^ ^
+ %39 : Double(1, 256, 13, 13) = aten::_convolution(%38, %7, %8, %22, %22, %22, %23, %25, %21, %23, %23, %26), scope: AlexNet/Sequential[features]/Conv2d[8]
? ^ ^ ^ ^
- %38 : Double(1, 256, 13, 13) = aten::threshold(%37, %23, %23), scope: AlexNet/Sequential[features]/ReLU[9]
- %39 : Double(1, 256, 13, 13) = aten::_convolution(%38, %9, %10, %22, %22, %22, %23, %24, %21, %23, %23, %21), scope: AlexNet/Sequential[features]/Conv2d[10]
- %40 : Double(1, 256, 13, 13) = aten::threshold(%39, %23, %23), scope: AlexNet/Sequential[features]/ReLU[11]
? ^ ^ ^^
+ %40 : Double(1, 256, 13, 13) = aten::threshold(%39, %24, %24), scope: AlexNet/Sequential[features]/ReLU[9]
? ^ ^ ^
+ %41 : Double(1, 256, 13, 13) = aten::_convolution(%40, %9, %10, %22, %22, %22, %23, %25, %21, %23, %23, %26), scope: AlexNet/Sequential[features]/Conv2d[10]
+ %42 : Double(1, 256, 13, 13) = aten::threshold(%41, %24, %24), scope: AlexNet/Sequential[features]/ReLU[11]
- %41 : Double(1, 256, 6, 6), %42 : Long(1, 256, 6, 6) = aten::max_pool2d_with_indices(%40, %28, %20, %24, %22, %23), scope: AlexNet/Sequential[features]/MaxPool2d[12]
? ^ ^ ----- ^
+ %43 : Double(1, 256, 6, 6), %44 : Long(1, 256, 6, 6) = aten::max_pool2d_with_indices(%42, %30, %20, %25, %22, %23), scope: AlexNet/Sequential[features]/MaxPool2d[12]
? ^ ^ +++++ ^
- %43 : int = aten::size(%41, %23), scope: AlexNet
? ^ ^ ^
+ %45 : int = aten::size(%43, %24), scope: AlexNet
? ^ ^ ^
- %44 : Long() = prim::NumToTensor(%43), scope: AlexNet
? ^ ^
+ %46 : Long() = prim::NumToTensor(%45), scope: AlexNet
? ^ ^
- %45 : int = prim::TensorToNum(%44), scope: AlexNet
? ^ ^
+ %47 : int = prim::TensorToNum(%46), scope: AlexNet
? ^ ^
- %46 : int = prim::Constant[value=9216](), scope: AlexNet
? ^
+ %48 : int = prim::Constant[value=9216](), scope: AlexNet
? ^
- %47 : int[] = prim::ListConstruct(%45, %46), scope: AlexNet
? ^ ^ ^
+ %49 : int[] = prim::ListConstruct(%47, %48), scope: AlexNet
? ^ ^ ^
- %48 : Double(1, 9216) = aten::view(%41, %47), scope: AlexNet
? ^^ ^ ^
+ %50 : Double(1, 9216) = aten::view(%43, %49), scope: AlexNet
? ^^ ^ ^
- %49 : float = prim::Constant[value=0.5](), scope: AlexNet/Sequential[classifier]/Dropout[0]
? ^^
+ %51 : float = prim::Constant[value=0.5](), scope: AlexNet/Sequential[classifier]/Dropout[0]
? ^^
- %50 : Double(1!, 9216) = aten::dropout(%48, %49, %21), scope: AlexNet/Sequential[classifier]/Dropout[0]
? ^ ^^ ^^ ^
+ %52 : Double(1!, 9216) = aten::dropout(%50, %51, %26), scope: AlexNet/Sequential[classifier]/Dropout[0]
? ^ ^^ ^^ ^
- %51 : Double(9216!, 4096!) = aten::t(%11), scope: AlexNet/Sequential[classifier]/Linear[1]
? ^
+ %53 : Double(9216!, 4096!) = aten::t(%11), scope: AlexNet/Sequential[classifier]/Linear[1]
? ^
- %52 : int = prim::Constant[value=4096](), scope: AlexNet/Sequential[classifier]/Linear[1]
? ^
+ %54 : int = prim::Constant[value=4096](), scope: AlexNet/Sequential[classifier]/Linear[1]
? ^
- %53 : int[] = prim::ListConstruct(%21, %52), scope: AlexNet/Sequential[classifier]/Linear[1]
? ^ ^
+ %55 : int[] = prim::ListConstruct(%21, %54), scope: AlexNet/Sequential[classifier]/Linear[1]
? ^ ^
- %54 : Double(1, 4096) = aten::expand(%12, %53, %21), scope: AlexNet/Sequential[classifier]/Linear[1]
? ^ ^ ^
+ %56 : Double(1, 4096) = aten::expand(%12, %55, %26), scope: AlexNet/Sequential[classifier]/Linear[1]
? ^ ^ ^
- %55 : Double(1, 4096) = aten::addmm(%54, %50, %51, %21, %21), scope: AlexNet/Sequential[classifier]/Linear[1]
? ^ ^ ^ ^
+ %57 : Double(1, 4096) = aten::addmm(%56, %52, %53, %21, %21), scope: AlexNet/Sequential[classifier]/Linear[1]
? ^ ^ ^ ^
- %56 : Double(1, 4096) = aten::threshold(%55, %23, %23), scope: AlexNet/Sequential[classifier]/ReLU[2]
? ^ ^ ^ ^
+ %58 : Double(1, 4096) = aten::threshold(%57, %24, %24), scope: AlexNet/Sequential[classifier]/ReLU[2]
? ^ ^ ^ ^
- %57 : Double(1!, 4096) = aten::dropout(%56, %49, %21), scope: AlexNet/Sequential[classifier]/Dropout[3]
? ^ ^ ^^ ^
+ %59 : Double(1!, 4096) = aten::dropout(%58, %51, %26), scope: AlexNet/Sequential[classifier]/Dropout[3]
? ^ ^ ^^ ^
- %58 : Double(4096!, 4096!) = aten::t(%13), scope: AlexNet/Sequential[classifier]/Linear[4]
? ^^
+ %60 : Double(4096!, 4096!) = aten::t(%13), scope: AlexNet/Sequential[classifier]/Linear[4]
? ^^
- %59 : Double(1, 4096) = aten::expand(%14, %53, %21), scope: AlexNet/Sequential[classifier]/Linear[4]
? ^^ ^ ^
+ %61 : Double(1, 4096) = aten::expand(%14, %55, %26), scope: AlexNet/Sequential[classifier]/Linear[4]
? ^^ ^ ^
- %60 : Double(1, 4096) = aten::addmm(%59, %57, %58, %21, %21), scope: AlexNet/Sequential[classifier]/Linear[4]
? ^ ^^ -----
+ %62 : Double(1, 4096) = aten::addmm(%61, %59, %60, %21, %21), scope: AlexNet/Sequential[classifier]/Linear[4]
? ^ +++++ ^^
- %61 : Double(1, 4096) = aten::threshold(%60, %23, %23), scope: AlexNet/Sequential[classifier]/ReLU[5]
? ^ ^ ^ ^
+ %63 : Double(1, 4096) = aten::threshold(%62, %24, %24), scope: AlexNet/Sequential[classifier]/ReLU[5]
? ^ ^ ^ ^
- %62 : Double(4096!, 1000!) = aten::t(%15), scope: AlexNet/Sequential[classifier]/Linear[6]
? ^
+ %64 : Double(4096!, 1000!) = aten::t(%15), scope: AlexNet/Sequential[classifier]/Linear[6]
? ^
- %63 : int = prim::Constant[value=1000](), scope: AlexNet/Sequential[classifier]/Linear[6]
? ^
+ %65 : int = prim::Constant[value=1000](), scope: AlexNet/Sequential[classifier]/Linear[6]
? ^
- %64 : int[] = prim::ListConstruct(%21, %63), scope: AlexNet/Sequential[classifier]/Linear[6]
? ^ ^
+ %66 : int[] = prim::ListConstruct(%21, %65), scope: AlexNet/Sequential[classifier]/Linear[6]
? ^ ^
- %65 : Double(1, 1000) = aten::expand(%16, %64, %21), scope: AlexNet/Sequential[classifier]/Linear[6]
? ^ ^ ^
+ %67 : Double(1, 1000) = aten::expand(%16, %66, %26), scope: AlexNet/Sequential[classifier]/Linear[6]
? ^ ^ ^
- %66 : Double(1, 1000) = aten::addmm(%65, %61, %62, %21, %21), scope: AlexNet/Sequential[classifier]/Linear[6]
? ^ ^ ^ ^
+ %68 : Double(1, 1000) = aten::addmm(%67, %63, %64, %21, %21), scope: AlexNet/Sequential[classifier]/Linear[6]
? ^ ^ ^ ^
- return (%66);
? ^
+ return (%68);
? ^
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment