wkentaro / pytorch-for-numpy-users Goto Github PK
View Code? Open in Web Editor NEWPyTorch for Numpy users. https://pytorch-for-numpy-users.wkentaro.com
License: MIT License
PyTorch for Numpy users. https://pytorch-for-numpy-users.wkentaro.com
License: MIT License
_______________________________ test_numpy_0090 ________________________________
def test_numpy_0090():
x = np.array([[1, 2, 3], [4, 5, 6]])
> x.transpose(2, 0, 1)
E ValueError: axes don't match array
tests/test_numpy_0090.py:6: ValueError
______________________________ test_pytorch_0091 _______________________________
def test_pytorch_0091():
x = torch.tensor([[1, 2, 3], [4, 5, 6]])
> x.permute(2, 0, 1); x.transpose(1, 2).tranpose(0, 1) # 012 -> 021 -> 201
E RuntimeError: number of dims don't match in permute
tests/test_pytorch_0091.py:6: RuntimeError
Seems like the tests assume to be operating on 3D arrays. Got this with numpy 1.17.4 and torch 1.5.0 .
maybe it should be tensor.size()
Please add a License file to this project
Hey, really cool work. Thanks.
If you don't mind, I can make a PR with support for pytorch 0.4. examples incl where we don't have LongTensor it's just tensor(x, dtype=torch.long). There's much more.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.