To

Torch Lens Maker – Differentiable Geometric Optics in PyTorch

Hacker News

Torch Lens Maker – Differentiable Geometric Optics in PyTorch

Hello HN! For the past 6 months I've been working on an open source python library that implements differentiable geometric optics in PyTorch. It's very experimental still, but eventually the goal is to use it to design optical systems with a state of the art optimization framework and a beautiful code based API. Think OpenSCAD, but for optical systems. Not only is PyTorch's autograd an amazing general purpose optimizer, but torch.nn (the neural network building blocks) can be used pretty much out of the box to model an optical system. This is because there is a strong analogy to be made between layers of a neural network, and optical elements in a so-called sequential optical system. So the magic is that we can stack lenses as if we were stacking Conv2D and ReLu layers and everything works out. Instead of Conv2D you have ray-surface collision detection, instead of ReLu you have the law of refraction. Designing lenses is surprisingly like training a neural network. Check out the docs for examples of using the API. My favorite one is the rainbow :) https://victorpoughon.github.io/torchlensmaker/examples/rain... You should be able to `pip install torchlensmaker` to try it out, but I just set it up so let me know if there's any trouble. I was part of the Winter 1'24 batch at the Recurse Center ( https://www.recurse.com/ ) working on this project pretty much full time. I'm happy to talk about that experience too!

Share card

Actual performance

179points
45comments
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
84%84% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Hacker NewsStrong engagement from HN community · Strong signals: open source, io · Missing: https docs, excited, just released
68%68% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
Product HuntOn track for Day 1 leaderboard · Strong signals: model, using, code · Missing: mac, agents, macos
67%67% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Strong signals: month · Missing: mobile apps, ios, personal
45%45% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
31%31% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Strong signals: training · Missing: arr, mrr, revenue
17%17% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Le
Lens – lens Is not ls36%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Lens – lens Is not ls

Hacker News2
Th
Through the Geek's Lens33%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Through the Geek's Lens

Hacker News2
Di
Disable Google Lens33%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Disable Google Lens

Hacker News1
Pi
PinkShirtDay Maker46%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

PinkShirtDay Maker

Hacker News1
I
I Made a Histogram Maker46%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

I Made a Histogram Maker

Hacker News4
Hi
Histogram Maker46%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Histogram Maker

Hacker News2
I
I Made a Histogram Maker46%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

I Made a Histogram Maker

Hacker News3
I
I Made a Caricature Maker46%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

I Made a Caricature Maker

Hacker News2
I
I Made a Caricature Maker46%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

I Made a Caricature Maker

Hacker News2
Wo
WordGen a Robust Wordlist Maker47%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

WordGen a Robust Wordlist Maker

Hacker News1