TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Advent of Code 2021 in pure TensorFlow – day 1

80 点作者 me2too超过 3 年前

11 条评论

mlajtos超过 3 年前
This is fun idea. With these kind of coding tasks you won&#x27;t get any advantage of using differentiable programming paradigm, but it is a nice reminder how syntactically bad TensorFlow is. Code of any differentiable program should look identical to any non-differentiable program. Maybe a small annotation à la TorchScript [0] can be tolerated, but not reimplementing everything via function calls with overly descriptive names.<p>Btw link to GitHub repo is broken. Copy&amp;pasting URL works.<p>[0] <a href="https:&#x2F;&#x2F;pytorch.org&#x2F;docs&#x2F;stable&#x2F;jit_language_reference.html#language-reference" rel="nofollow">https:&#x2F;&#x2F;pytorch.org&#x2F;docs&#x2F;stable&#x2F;jit_language_reference.html#...</a>
评论 #29525337 未加载
评论 #29526379 未加载
keyle超过 3 年前
Ah yes, the enthusiasm of Day 1, &quot;let&#x27;s write my own stack DSL and do it on there!&quot;<p>Day 8 &quot;FML!&quot; <i>checks python version installed...</i>
评论 #29528245 未加载
not2b超过 3 年前
The problems get a lot harder so it would be interesting to see if you can get all the way through with this approach.
评论 #29528243 未加载
an-allen超过 3 年前
Lovely effort. Looks like the approach to the first one is just programatic, procedural updates to a variable.<p>Was hoping to see some training of a model to produce outputs. Good effort nonetheless!
评论 #29528229 未加载
NeutralForest超过 3 年前
That&#x27;s pretty funny, AoC is rule-based so I don&#x27;t think there will be much &quot;deep&quot; learning going but I hope I&#x27;ll be surprised!
评论 #29528222 未加载
exdsq超过 3 年前
I’d like to read this but the number of ads navigating the blog on mobile is a horrible UX :(
评论 #29528238 未加载
评论 #29526960 未加载
评论 #29526328 未加载
brilee超过 3 年前
You wrote this...<p><pre><code> All the comparisons like &gt; are better written using their TensorFlow equivalent (e.g tf.greater). Autograph can convert them (you could write &gt;), but it’s less idiomatic and I recommend to do not relying upon the automatic conversion, for having full control. </code></pre> ...but I&#x27;m not sure you realized that the for loop and the if statement in your code are being transparently compiled to dataset.map() and tf.cond() for you by Autograph :)
评论 #29528202 未加载
antpls超过 3 年前
Good reading ! It would be interesting to have other similar challenges, such as Euler, solved in idiomatic Tensorflow and Pytorch. Also some examples of more complicated state-of-the-art algorithms, such as sorting&#x2F;graph&#x2F;trees algorithms reimplemented in these frameworks.<p>It would be a great introduction to these frameworks for people who never touched anything ML-related, leaving the neural network content to later in the learning process.<p>Learning how to create differentiable algorithms and neural networks would be easier once the way those frameworks work is understood (ingesting data, iterating dataset, running, debugging, profiling, etc).<p>If you are starting with neural networks or differentiable programming, learning both the maths and the frameworks at the same time can be quite overwhelming
0-_-0超过 3 年前
It would have been more tensorflow-y if you did this with convolutions (1x2 and 1x3)
评论 #29528254 未加载
bufferoverflow超过 3 年前
I wonder if GPT-3 can come up with a solution
NotEvil超过 3 年前
Site is censored in india.
评论 #29528212 未加载
评论 #29527878 未加载