Comments (4)
Yeah it should actually be x = x.permute(1, 2, 0). I think the valid inputs of transpose may have changed over time. I'll make a fix for this and for checking that your input dims are correct as well.
from pytorch-enhance.
Fixed in #7 and #8. Removed the permute/transpose op since this breaks for batch of images. I was mostly using this to just quickly upres a single image and format it to be easily plotted but I think this is a better compromise.
from pytorch-enhance.
@robmarkcole What is the shape of test_images[0]? PyTorch models require a batch dimension so I would think that's the issue. Try doing sr_img = model.enhance(test_images[0].unsqueeze(0)).
from pytorch-enhance.
test_images[0].shape
torch.Size([1, 200, 200])
What is required is torch.Size([1, 1, 200, 200]
so I try:
sr_img = model.enhance(torch.unsqueeze(test_images[0], 0))
getting
---> 80 x = x.transpose((1, 2, 0))
81 return x
TypeError: transpose() received an invalid combination of arguments - got (tuple), but expected one of:
* (name dim0, name dim1)
* (int dim0, int dim1)
*
Might be a bug here? Pretty sure the transpose is not required
In this example they are using input = img_to_tensor(y).view(1, -1, y.size[1], y.size[0])
which achieves the same result..?
from pytorch-enhance.
Related Issues (11)
- Strange results. HOT 4
- Using bicubic model results in ValueError: optimizer got an empty parameter list HOT 3
- About the conv_index HOT 2
- Attempts to calc psnr independently result in differences HOT 4
- Couple of additional models
- where to find pretrained weights?
- Historical dataset error HOT 3
- Pypi version doesnt match master HOT 1
- Modified dataset to load from a local dir
- Some hardcoded channels in test_models.py HOT 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 pytorch-enhance.