Comments (4)
Hi Dazhi,
Could you check if you are on the latest version?
I just run the code below, it works fine.
# mdformable pooling (V2)
dpooling = DCNPooling(spatial_scale=1.0 / 4,
pooled_size=7,
output_dim=32,
no_trans=False,
group_size=1,
trans_std=0.1,
deform_fc_dim=1024).cuda()
# first
for _ in range(10):
dout = dpooling(input, rois)
target = dout.new(*dout.size())
target.data.uniform_(-0.1, 0.1)
error = (target - dout).mean()
error.backward()
from dcnv2.
Hi Charles, thanks for your reply. I have to use your code implemented for pytorch 0.4, and my problem was also triggered on pytorch 0.4.1.
I came up with an ugly but workable solution, which is to replace Function.save_for_backward
and Function.saved_tensors
with directly storing tensors as the Function objects' members. I have checked that this workaround produces correct results, but I'm not sure whether this would cause other problems.
from dcnv2.
I dont think save_for_backward
is the reason to "buffers have already been freed" error.
I think you might call backward twice, like forward -> backward -> backward
.
from dcnv2.
I am pretty positive that I didn't call two backwards consecutively. If you are not convinced about my conclusion, it should be very easy for you to switch to pytorch 0.4 implementation and add a loop to your example_mdpooling() in test.py. The error is triggered when calling _, _, ..., _ = self.saved_tensors, and it seems relative to your cuda code. I'm not familiar with pytorch, and I failed to pinpoint the root cause.
from dcnv2.
Related Issues (20)
- Fail to export ONNX model
- 关于编译报错的问题
- How can I add 'groups' into deformable conv?
- difference between DCNv2 and deform_conv2d in torchvision HOT 3
- ATen/cuda/CUDAContext.h
- DCNv2 python setup.py build develop give Error
- error: command 'g++' failed with exit status 1 HOT 4
- error: command 'g++' failed with exit status 1 HOT 1
- error: ‘THFloatBlas_gemv’ was not declared in this scope HOT 1
- module '_ext' has no attribute 'dcn_v2_forward'
- Build error parameter packs not expanded with ‘...’
- The repository need an update with the newer versions of pytorch HOT 1
- > > > pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cu110/torch_nightly.html
- There is a problem with the code in gnn_parse.py
- TH/TH.h: No such file or directory HOT 7
- ‘THFloatBlas_gemv’ was not declared in this scope
- pytorch version problem HOT 1
- I've already installed DCNv2, but it's still marked red HOT 1
- ImportError: dynamic module does not define module export function (PyInit__ext)
- error: command 'g++' failed with exit status 1
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 dcnv2.