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.

The matrix calculus you need for deep learning (2018)

224 pointsby cpp_frogalmost 2 years ago

13 comments

dangalmost 2 years ago
Related:<p><i>The matrix calculus you need for deep learning (2018)</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26676729">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26676729</a> - April 2021 (40 comments)<p><i>Matrix calculus for deep learning part 2</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=23358761">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=23358761</a> - May 2020 (6 comments)<p><i>Matrix Calculus for Deep Learning</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=21661545">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=21661545</a> - Nov 2019 (47 comments)<p><i>The Matrix Calculus You Need for Deep Learning</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=17422770">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=17422770</a> - June 2018 (77 comments)<p><i>Matrix Calculus for Deep Learning</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=16267178">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=16267178</a> - Jan 2018 (81 comments)
quantoalmost 2 years ago
The article&#x2F;webpage is a nice walk-through for the uninitiated. Half the challenge of doing matrix calculus is remembering the dimension of the object you are dealing with (scalar, vector, matrix, higher-dim tensor).<p>Ultimately, the point of using matrix calculus (or matrices in general) is not just concision of notation but also understanding that matrices are operators acting on members of some spaces, i.e. vectors. It is this higher level abstraction that makes matrices powerful.<p>For people who are familiar with the concepts but need a concise refresher, the Wikipedia page serves well:<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Matrix_calculus" rel="nofollow noreferrer">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Matrix_calculus</a>
评论 #36945894 未加载
SnooSuxalmost 2 years ago
This is the resource I wish I had in 2018. Every grad school course had a Linear Algebra review lecture but never got into the Matrix Calculus I actually needed.
评论 #36944360 未加载
评论 #36944807 未加载
评论 #36944582 未加载
cs702almost 2 years ago
Please change the link to the original source:<p><a href="https:&#x2F;&#x2F;arxiv.org&#x2F;abs&#x2F;1802.01528" rel="nofollow noreferrer">https:&#x2F;&#x2F;arxiv.org&#x2F;abs&#x2F;1802.01528</a><p>---<p>EDIT: It turns out explained.ai is the personal website of one of the authors, so there&#x27;s no need to change the link. See comment below.
评论 #36944953 未加载
评论 #36944106 未加载
trolanalmost 2 years ago
I finished Vector Calculus last year and have no experience in machine learning but this seems exceptionally thorough and would have made my life easier having a practical explanation over a mathematical one, but woe is the life of the engineering student I guess.
评论 #36944908 未加载
rdedevalmost 2 years ago
I had followed this when I was learning DL through Andrew NG&#x27;s course. In one of the lessons, he had the formula for calculating the loss as well as it&#x27;s derivatives.<p>I tried driving these formulas from scratch using what I learned from OP&#x27;s post but it felt like there was something missing. I think it boils down to me not knowing how to aggregate those element wise derivatives into a matrix form. Afaik the Matrix cookbook and certain notes from Stanford cs231n that helped me grok it fully
bluerooibosalmost 2 years ago
Oh nice, I did most of this in school, and during my non-CS engineering degree. Thanks for sharing!<p>Always wanted to dip my toes into ML, but I&#x27;ve never been convinced of it&#x27;s usefulness to the average solo developer, in terms of things you can build with this new knowledge. Likely I don&#x27;t know enough about it to make that call though.
评论 #36948198 未加载
godelskialmost 2 years ago
There&#x27;s a common belief that you don&#x27;t need math for ML or that you need a lot of math for ML. So let me clarify:<p>You don&#x27;t need math to make a model perform well, but you do need math to know why your model is wrong.
nsajkoalmost 2 years ago
Another matrix math reference: <a href="https:&#x2F;&#x2F;github.com&#x2F;r-barnes&#x2F;MatrixForensics">https:&#x2F;&#x2F;github.com&#x2F;r-barnes&#x2F;MatrixForensics</a>
_the_inflatoralmost 2 years ago
I just had a glimpse look at it. A good sum-up.<p>It seems that these topics are covered by the first one or two semesters of a Math degree. Of course university is a bit more advanced.
jayroalmost 2 years ago
We just released a comprehensive online course on Multivariable Calculus (<a href="https:&#x2F;&#x2F;mathacademy.com&#x2F;courses&#x2F;multivariable-calculus" rel="nofollow noreferrer">https:&#x2F;&#x2F;mathacademy.com&#x2F;courses&#x2F;multivariable-calculus</a>), and we also have a course on Mathematics for Machine Learning (<a href="https:&#x2F;&#x2F;mathacademy.com&#x2F;courses&#x2F;mathematics-for-machine-learning" rel="nofollow noreferrer">https:&#x2F;&#x2F;mathacademy.com&#x2F;courses&#x2F;mathematics-for-machine-lear...</a>) that covers just the matrix calculus you need in addition to just the linear algebra and statistics you need, etc. I&#x27;m a founder and would be happy to answer any questions you might have.
评论 #36948684 未加载
评论 #36947610 未加载
thatsadudealmost 2 years ago
vec(ABC)=kron(C.T,A)vec(C) is all your need for matrix calculus!
评论 #36946796 未加载
scrubsalmost 2 years ago
Darn good post!