Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions torch/nn/_functions/thnn/upsampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,10 @@ def symbolic(g, input, size=None, scale_factor=None):
if scale_factor is None:
scale_factor = 1.0
if size is not None and set(size) != set([None]):
warnings.warn("ONNX export failed on UpsamplingNearest2d because size is not supported")
return g.op("ResizeNearest", input, width_scale_f=scale_factor, height_scale_f=scale_factor)
from torch.onnx.symbolic import _unimplemented
return _unimplemented("UpsamplingNearest2d", "size")
return g.op("Upsample", input, width_scale_f=scale_factor,
height_scale_f=scale_factor, mode_s="nearest")

@staticmethod
def forward(ctx, input, size=None, scale_factor=None):
Expand Down