GithubHelp home page GithubHelp logo

How to set the beta? about adapool HOT 3 CLOSED

kojingying avatar kojingying commented on August 19, 2024
How to set the beta?

from adapool.

Comments (3)

alexandrosstergiou avatar alexandrosstergiou commented on August 19, 2024

Hi @kojingying,

Your beta definition seems correct. You may want to ensure that the pooled x tensor will indeed be of oH,oW size.

For example, you can test if AdaPool2d works with beta=(1,1) (broadcasting the same value over the entire tensor as in issue #5 ).

Afterwards, if you would prefer to use beta as a matrix, you can find any difference between oH,oW and x.shape[2:].

from adapool.

Culturenotes avatar Culturenotes commented on August 19, 2024

self.pool = nn.AvgPool2d(ih // 32, 1)<——self.pool = AdaPool2d(kernel_size=ih // 32, stride=1, beta=(1, 1))

When I try to replace avgpool2d with adapool2d, the following error occurs:

“AssertionError: Only CUDA implementation supported!”

How can I use it correctly?

from adapool.

alexandrosstergiou avatar alexandrosstergiou commented on August 19, 2024

@Culturenotes it seems that either your input tensor or the beta is in the CPU. The current implementation only runs in CUDA, so you'll need to have all tensors used in AdaPool2d in CUDA.

from adapool.

Related Issues (14)

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.