Comments (6)
Are you running the script in the repo base folder? Try to run it in different folder.
from pytorch-encoding.
No, this is not the issue here. I'm running my script from a separate folder, say /home/<user>/code
. But thanks for having a look at this. I'll keep you updated when I found something that could be responsible for this issue.
Is it intentional that the folder /home/<user>/.conda/envs/pytorch-0.3.1-3.5-s/lib/python3.5/site-packages/encoding/_ext
does not contain any .py files?
from pytorch-encoding.
something wrong with the installation, there should be __init__.py
automatically generated:
_encoding_lib.abi3.so* __init__.py __pycache__/
from pytorch-encoding.
Ok, strange. It just didn't copy the __init__.py
file for some reason. I also couldn't find anything in the log files, Everything seemed to be run though without errors. I tried installation multiple times.
I ended up just copying this file manually from the sources to this directory, this solved the issue.
But now I get:
[...]
my_loss.backward()
File "/home/<user>/.conda/envs/pytorch-0.3.1-3.5-s/lib/python3.5/site-packages/torch/autograd/variable.py", line 167, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph, retain_variables)
File "/home/<user>/.conda/envs/pytorch-0.3.1-3.5-s/lib/python3.5/site-packages/torch/autograd/__init__.py", line 99, in backward
variables, grad_variables, retain_graph)
File "/home/<user>/.conda/envs/pytorch-0.3.1-3.5-s/lib/python3.5/site-packages/torch/autograd/function.py", line 91, in apply
return self._forward_cls.backward(self, *args)
File "/home/<user>/.conda/envs/pytorch-0.3.1-3.5-s/lib/python3.5/site-packages/encoding/functions/syncbn.py", line 47, in backward
gradInput, input.data.view(B, C, -1), gradSum, gradSquare)
File "/home/<user>/.conda/envs/pytorch-0.3.1-3.5-s/lib/python3.5/site-packages/torch/utils/ffi/__init__.py", line 180, in safe_call
result = torch._C._safe_call(*args, **kwargs)
TypeError: initializer for ctype 'struct THCudaTensor *' must be a cdata pointer, not Variable
Is this related to my incomplete installation or actually a new bug?
P.S. cffi package version 1.11.5 is installed on my system.
Edit: Solved by changing two lines of code!
It was not related to this issue, it's rather a pytorch 0.3.1 compatibility issue, I opened a new issue report for this.
And finally, the code runs on my machine! Thanks so far for all the helpful comments!
from pytorch-encoding.
Please checkout the newest version and see if you still have the trouble. See details in PR #51
from pytorch-encoding.
fixed in PR #59
from pytorch-encoding.
Related Issues (20)
- ImportError: cannot import name 'cpu' HOT 2
- How long will it cost for taining on PASCAL-Context dataset?
- Unsupported gpu architecture HOT 2
- AttributeError: 'tuple' object has no attribute 'log_softmax' HOT 3
- The code of visual center HOT 1
- The code of visual center HOT 1
- Package has issues with Pytorch 1.10 HOT 2
- 编译enclib_cpu模块时出错 HOT 2
- What changes need to be made in this repo if I wanted to use this on CamVid dataset
- target.cpu().numpy().astype('int64') + 1
- Which index matches which class in ADE20k?
- Error in Building the Docker Container HOT 5
- ResNet 101 pretrained model equivalent to old version HOT 5
- ImportError when trying to import encoding or its modules HOT 1
- installation error HOT 1
- 编译安装遇到的问题和解决方法记录 HOT 4
- ImportError: cannot import name 'cpu' from partially initialized module 'encoding' (most likely due to a circular import) HOT 2
- lib compile failed HOT 2
- RuntimeError: cudaGetLastError() == cudaSuccess INTERNAL ASSERT FAILED at "/home/msadi002/2023_challenge-main/baseline/utils/lib/gpu/encoding_kernel.cu":233 HOT 1
- 问题一:print(model)与forward中定义的model不一致,与文章中的结构不一致。问题二:且训练时,无法更新fc层梯度
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 pytorch-encoding.