Comments (3)
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.
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.
@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)
- 你好 HOT 1
- The version of pytorch and how to deal with `nan_to_num` function in lower versions HOT 1
- pytorch HOT 2
- how to use it in yolov5 HOT 1
- Does AdaPool2d's beta require fixed image size? HOT 1
- Can I use it in kaggle? HOT 2
- Solution: Unresolved extern function '_Z3powdi'” HOT 1
- Installation issue on Google Colab HOT 2
- can you share the code for object detection? HOT 1
- CAN HOT 3
- About Adaptive Pool 2d HOT 2
- 反向传播的报错 HOT 1
- input must be a CUDA tensor error when using AdaPool3d HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adapool.