Summary:
In discussion with houseroad, because Upsample op is being updated in ONNX https://github.com/onnx/onnx/pull/1773 and these tests are blocking it. These tests will be updated once the ONNX PR goes in.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/17696
Differential Revision:
D14338845
Pulled By: houseroad
fbshipit-source-id:
cfaf8cf1ab578ae69dd3bf21b1c0681b572b9b6f
+++ /dev/null
-ir_version: 4
-producer_name: "pytorch"
-producer_version: "1.1"
-graph {
- node {
- output: "1"
- op_type: "Constant"
- attribute {
- name: "value"
- t {
- dims: 4
- data_type: 1
- raw_data: "\000\000\200?\000\000\200?\000\000\000@\000\000\000@"
- }
- type: TENSOR
- }
- }
- node {
- input: "input"
- input: "1"
- output: "2"
- op_type: "Upsample"
- attribute {
- name: "mode"
- s: "linear"
- type: STRING
- }
- }
- name: "torch-jit-export"
- input {
- name: "input"
- type {
- tensor_type {
- elem_type: 1
- shape {
- dim {
- dim_value: 1
- }
- dim {
- dim_value: 2
- }
- dim {
- dim_value: 3
- }
- dim {
- dim_value: 4
- }
- }
- }
- }
- }
- output {
- name: "2"
- type {
- tensor_type {
- elem_type: 1
- shape {
- dim {
- dim_value: 1
- }
- dim {
- dim_value: 2
- }
- dim {
- dim_value: 6
- }
- dim {
- dim_value: 8
- }
- }
- }
- }
- }
-}
-opset_import {
- version: 10
-}
sqnet_v1_1 = SqueezeNet(version=1.1)
self.exportTest(toC(sqnet_v1_1), toC(x))
+ @unittest.skip("Temporary - waiting for https://github.com/onnx/onnx/pull/1773.")
def test_densenet(self):
# Densenet-121 model
x = Variable(torch.randn(BATCH_SIZE, 3, 224, 224).fill_(1.0))
x = torch.randn(1, 2, 3, 4, requires_grad=True)
self.assertONNX(lambda x: x.norm(p=2, dim=2), (x))
+ @unittest.skip("Temporary - waiting for https://github.com/onnx/onnx/pull/1773.")
def test_upsample(self):
x = torch.randn(1, 2, 3, 4, requires_grad=True)
self.assertONNX(lambda x: nn.functional.interpolate(x, scale_factor=2., mode='bilinear'), x)
x = torch.randn(4, 3, 2, 1, requires_grad=True)
self.run_model_test(MyModel(), train=False, input=(x), batch_size=BATCH_SIZE, use_gpu=False)
+ @unittest.skip("Temporary - waiting for https://github.com/onnx/onnx/pull/1773.")
def test_upsample(self):
x = torch.randn(1, 2, 3, 4, requires_grad=True)
model = nn.Upsample(scale_factor=2, mode='nearest')