Hello, resnet18 referenced in this link: https://s3.amazonaws.com/onnx-model-zoo/resnet/resnet18v1/resnet18v1.onnx has problems between global average pool op and gemm op. Specifically, according to ONNX spec, the output of global avg pool retains the trailing trivial dimensions.
Output data tensor from pooling across the input tensor. Dimensions will be N x C x 1 x 1
Thus, the output of this operation in the context of resnet18 will be (N, C, 1, 1), whereas gemm expects 2-dimensional input as implied by the ONNX spec:
Compute Y = alpha * A' * B' + beta * C, where input tensor A has shape (M, K) or (K, M), input tensor B has shape (K, N) or (N, K),
Clearly putting gemm right after global average pool does not conform to the spec. Either model or the spec should be changed.
Hello, resnet18 referenced in this link: https://s3.amazonaws.com/onnx-model-zoo/resnet/resnet18v1/resnet18v1.onnx has problems between global average pool op and gemm op. Specifically, according to ONNX spec, the output of global avg pool retains the trailing trivial dimensions.
Thus, the output of this operation in the context of resnet18 will be (N, C, 1, 1), whereas gemm expects 2-dimensional input as implied by the ONNX spec:
Clearly putting gemm right after global average pool does not conform to the spec. Either model or the spec should be changed.