GithubHelp home page GithubHelp logo

Comments (5)

xinntao avatar xinntao commented on July 17, 2024 5

@Hedronmx
I think this warning will not kill the program...

You can replace the nn.Upsample to nn.functional.interpolate. You need to re-write the structure, because the whole model is in a nn.Sequential now and nn.functional.interpolate should be used in the forward function.

from esrgan.

xinntao avatar xinntao commented on July 17, 2024 2

This is not a problem, it is just a warning. Because pytorch has changed the interface and nn.Upsample is deprecated.

from esrgan.

Hedronmx avatar Hedronmx commented on July 17, 2024

I get the same issue but my process gets killed.

/home/carlos/.local/lib/python3.6/site-packages/torch/nn/modules/upsampling.py:129: UserWarning: nn.Upsample is deprecated. Use nn.functional.interpolate instead. warnings.warn("nn.{} is deprecated. Use nn.functional.interpolate instead.".format(self.name)) Killed

from esrgan.

taily-khucnaykhongquantrong avatar taily-khucnaykhongquantrong commented on July 17, 2024

You could implement yourself:

class Interpolate(nn.Module):
    def __init__(self, scale_factor, mode):
        super(Interpolate, self).__init__()
        self.interp = nn.functional.interpolate
        self.scale_factor = scale_factor
        self.mode = mode
        
    def forward(self, x):
        x = self.interp(x, scale_factor=self.scale_factor, mode=self.mode)
        return x

Then assign it:
upsample = Interpolate(scale_factor=upscale_factor, mode=mode)

from esrgan.

xinntao avatar xinntao commented on July 17, 2024

@young666 Thanks.
We are now updating a new version for ESRGAN testing codes and BasicSR repo and we will fix it.

from esrgan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.