Comments (7)
Where is the test.py file you are running? I'm looking at line 164 of generate_unitsegments.py and it's not the same.
from ddsm-visual-primitives.
The test.py is just generate_unitsegments.py with a different name. I added some print statements try to debug myself so the number might not be correct. The error occurs everytime I run model(input). I have also checked input shape, which is (32, 3,227,227), which looks correct.
from ddsm-visual-primitives.
Hmm, could you attach your test.py file, and also the .../virtual_envs/ML/lib/python3.5/site-packages/torchvision/models/resnet.py file?
from ddsm-visual-primitives.
Yes, of course.
test.py.txt
resnet.py.txt
from ddsm-visual-primitives.
I changed the image size to 224,224 and fixed the issue. I also added a resize line in DDSM transforms.
from ddsm-visual-primitives.
Okay, sounds good. Please note though that resizing the image to 224x224 from 227x227 will produce different outputs and lower AUC numbers than reported in the paper, since the resizing blurs the image.
If you are curious why you were getting the original error, it is because the torchvision resnet was changed in newer versions. I took a look at your resnet.py and it is the newer version. In particular, nn.AvgPool2d(7)
was changed to nn.AvgPool2d(7, stride=1)
in this commit.
If you install torchvision 0.1.9, the error should go away and the code should work as-is. This pitfall was described in the README.
from ddsm-visual-primitives.
Yes, of course.
test.py.txt
resnet.py.txt
can you share full code?
from ddsm-visual-primitives.
Related Issues (3)
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 ddsm-visual-primitives.