TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

PyTorch – Tensors and Dynamic neural networks in Python

447 pointsby programnatureover 8 years ago

18 comments

Smerityover 8 years ago
Only a few months ago people saying that the deep learning library ecosystem was starting to stabilize. I never saw that as the case. The latest frontier for deep learning libraries is ensuring efficient support for dynamic computation graphs.<p>Dynamic computation graphs arise whenever the amount of work that needs to be done is variable. This may be when we&#x27;re processing text, one example being a few words while another being paragraphs of text, or when we are performing operations against a tree structure of variable size. This problem is particularly prominent in particular subfields, such as natural language processing, where I spend most of my time.<p>PyTorch tackles this very well, as do Chainer[1] and DyNet[2]. Indeed, PyTorch construction was directly informed from Chainer[3], though re-architected and designed to be even faster still. I have seen all of these receive renewed interest in recent months, particularly amongst many researchers performing cutting edge research in the domain. When you&#x27;re working with new architectures, you want the most flexibility possible, and these frameworks allow for that.<p>As a counterpoint, TensorFlow does not handle these dynamic graph cases well at all. There are some primitive dynamic constructs but they&#x27;re not flexible and usually quite limiting. In the near future there are plans to allow TensorFlow to become more dynamic, but adding it in after the fact is going to be a challenge, especially to do efficiently.<p>Disclosure: My team at Salesforce Research use Chainer extensively and my colleague James Bradbury was a contributor to PyTorch whilst it was in stealth mode. We&#x27;re planning to transition from Chainer to PyTorch for future work.<p>[1]: <a href="http:&#x2F;&#x2F;chainer.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;chainer.org&#x2F;</a><p>[2]: <a href="https:&#x2F;&#x2F;github.com&#x2F;clab&#x2F;dynet" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;clab&#x2F;dynet</a><p>[3]: <a href="https:&#x2F;&#x2F;twitter.com&#x2F;jekbradbury&#x2F;status&#x2F;821786330459836416" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;jekbradbury&#x2F;status&#x2F;821786330459836416</a>
评论 #13429802 未加载
评论 #13432843 未加载
评论 #13430445 未加载
评论 #13468459 未加载
评论 #13451130 未加载
评论 #13431652 未加载
评论 #13440805 未加载
smhxover 8 years ago
It&#x27;s a community-driven project, a Python take of Torch <a href="http:&#x2F;&#x2F;torch.ch&#x2F;" rel="nofollow">http:&#x2F;&#x2F;torch.ch&#x2F;</a>. Several folks involved in development and use so far (a non-exhaustive list):<p>* Facebook * Twitter * NVIDIA * SalesForce * ParisTech * CMU * Digital Reasoning * INRIA * ENS<p>The maintainers work at Facebook AI Research
评论 #13429562 未加载
spyspyover 8 years ago
This project aside, I&#x27;m in love with that setup UI on the homepage telling you exactly how to get started given your current setup.
评论 #13429636 未加载
评论 #13433985 未加载
评论 #13428734 未加载
programnatureover 8 years ago
Actually not clear if there is an official affiliation with Facebook, other than some of the primary devs.
评论 #13428386 未加载
tdees40over 8 years ago
At this point I&#x27;ve used PyTorch, Tensorflow and Theano. Which one do people prefer? I haven&#x27;t done a ton of benchmarking, but I&#x27;m not seeing huge differences in speed (mostly executing on the GPU).
评论 #13428930 未加载
taterbaseover 8 years ago
Is there any reason this might not work in windows? I see no installation docs for it.
评论 #13429060 未加载
EternalDataover 8 years ago
Been using PyTorch for a few things. Love how it integrates with Numpy.
theoracle101over 8 years ago
Most important question. Is this still 1 indexed (Lua was 1 indexed, which means porting code you need to be aware of this)?
评论 #13429536 未加载
评论 #13429539 未加载
rtcomsover 8 years ago
I&#x27;ve never fiddled with machine learning thing so don&#x27;t know anything about it.<p>I am wondering if CUDA is mandatory for torch installation ? I use a Macbook air which doesn&#x27;t have graphics card, so not sure if torch can be installed and used on my machine.
评论 #13428921 未加载
评论 #13428951 未加载
评论 #13428833 未加载
baqover 8 years ago
Very nice to see Python 3.5 there.
jbsimpsonover 8 years ago
This is really interesting, I&#x27;ve been wanting to learn more about Torch for a while but have been reluctant to commit to learning Lua.
评论 #13436784 未加载
ankitmlover 8 years ago
I am confused with the license file. What does it mean? Some rights reserved and copyright... Doesnt look like a real open source project.
评论 #13428649 未加载
评论 #13428618 未加载
评论 #13428529 未加载
gallerdudeover 8 years ago
What&#x27;s the highest level neural network lib I can use? I&#x27;m a total programming idiot but I find neural nets fascinating.
评论 #13431307 未加载
评论 #13430311 未加载
评论 #13431229 未加载
aaron-leboover 8 years ago
Is this related to lua&#x27;s Torch at all?<p><a href="http:&#x2F;&#x2F;torch.ch&#x2F;" rel="nofollow">http:&#x2F;&#x2F;torch.ch&#x2F;</a>
评论 #13428576 未加载
评论 #13428539 未加载
评论 #13430964 未加载
0mpover 8 years ago
It is worth adding that there is a wip branch focused on making PyTorch tensors distributable across machines in a master-workers model: <a href="https:&#x2F;&#x2F;github.com&#x2F;apaszke&#x2F;pytorch-dist&#x2F;" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;apaszke&#x2F;pytorch-dist&#x2F;</a>
shmattover 8 years ago
i&#x27;ve been running their dcgan.torch code in the past few days and results have been pretty amazing for plug and play
vegabookover 8 years ago
Guess there&#x27;s no escaping Python. I had hoped Lua(jit) might emerge as a scientific programming alternative but with Torch now throwing its hat into the Python ring I sense a monoculture in the making. Bit of a shame really because Lua is a nice language and was an interesting alternative.
评论 #13429114 未加载
评论 #13429750 未加载
评论 #13429960 未加载
评论 #13431843 未加载
评论 #13429678 未加载
评论 #13429354 未加载
plgover 8 years ago
Every time I decide I&#x27;m going to get into Python frameworks again, and I start looking at code, and I see people making everything object-oriented, I bail<p>Just a personal (anti-)preference I guess
评论 #13431700 未加载
评论 #13429700 未加载