question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

parameter align_corners for nn.Upsample function

See original GitHub issue

When I use the Pytorch 0.4.0 to train the model, I got some warnings:

UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
  "See the documentation of nn.Upsample for details.".format(mode))

As the available PyTorch version declared in README.md is PyTorch(0.3.0+), is the value for align_corners True or False?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
YangJae96commented, Apr 11, 2020

Where are the align_corners??? I want to know how to set it up.

2reactions
JiaRenChangcommented, Jun 27, 2018

@zhFuECL Hi, we set align_corners = True for pytorch 0.4.0+.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upsample — PyTorch 1.13 documentation
With align_corners = True , the linearly interpolating modes ( linear , bilinear , bicubic , and trilinear ) don't proportionally align the...
Read more >
Source code for monai.networks.blocks.upsample
See also: https://pytorch.org/docs/stable/nn.html#upsample align_corners: set the align_corners parameter of `torch.nn.Upsample`. Defaults to True.
Read more >
How to upsample a PyTorch tensor? - Stack Overflow
What about PyTorch's nn.Upsample function: upsample = nn.Upsample(scale_factor=2) x = upsample(x). Not sure if that's what you are looking ...
Read more >
Upsample
Upsample input via interpolating neighborhoods. ... Upsample(size=6)(x) # Size: (1, 2, 6, 6) z = torch.nn. ... See also. torch.nn.functional.interpolate(…) ...
Read more >
Upsampling in Core ML - Machine, Think!
If you're using a model that has NN upsampling but with a ... issues with the bad method, the align_corners=True parameter was introduced....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found