3 ms·
In terms of impedance mismatch, I wish the PyTorch API was more similar to numpy. eg: using .shape instead of .size, using the same method names where possible.
by tachyonbeam 9y ago
In terms of impedance mismatch, I wish the PyTorch API was more similar to numpy. eg: using .shape instead of .size, using the same method names where possible. Seems like a small detail, but it could make PyTorch a little bit more intuitive.
- craigching 9y agoThey mention increased NumPy API compatibility in the article. Seems like that would cover what you’re asking for. FWIW, I agree, there are some things that NumPy does that TensorFlow doesn’t that I’d like to see. .T for transpose being one of them, but maybe I’m not understanding something there. I’m probably just bike shedding a little though ;)
- amelius 9y agoI'd love to see the foundational layer of PyTorch integrated into Numpy, so that e.g. Numpy matrix-multiplications can be performed on the GPU without rewriting (much) code.
- deleted 9y ago[deleted]
- deepGem 9y agoPerhaps numba might help, accelerated by gputoolkit http://numba.pydata.org/ http://numba.pydata.org/
- cs702 9y agoThe latest versions of PyTorch (compiled from repo) already do this: > x = torch.rand(4, 3) > x.size() torch.Size([4, 3]) > x.shape torch.Size([4, 3]) Their explicitly stated goal is to match numpy semantics as much as possible :-)