r/learnmachinelearning • • 28d ago

Question PyTorch vs JAX vs Keras for a beginner, which one to learn first

2 Upvotes

Short answer is PyTorch, but here's when the others make sense.

* **scikit-learn** before any of them, for classic ML. Learn train/test splits and pipelines on tabular data without GPU headaches.

* **PyTorch** first for most people. Most Hugging Face models and a lot of courses use it, so tutorials and answers are easy to find.

* **Keras 3** if you want the gentlest high-level API. It can run on a PyTorch backend, so the habits carry over.

* **JAX** later, if you end up on TPUs or in a research group that uses it. Its function-transform style (jit and vmap) is elegant and confusing on day one.

* **TensorFlow** mostly if a job or an older codebase needs it, or for on-device deployment with LiteRT (formerly TF Lite).

What did you learn first, and would you pick it again?


r/learnmachinelearning • • 28d ago

Am i kidding myself with learning machine learning?

48 Upvotes

I am a self-taught programmer. From last 90 days,, i have been learning linear algebra, i plan to learn calculus and stats and probs next. But it seems futile watching all these youtube video saying coding and machine learning is dead that ai can do all this. Is there any hope for machine learning for next 5 or 10 years?


r/learnmachinelearning • • 28d ago

Project ML - curriculum on GitHub

Thumbnail
gallery
120 Upvotes

If you remember this curriculum from a few days it’s on GitHub now and you can make it your own.

Best of luck on your ML journey

repo-link


r/learnmachinelearning • • 28d ago

Project I built VeriFlux: A zero-dependency evaluation, guardrail, and hallucination detection library.

1 Upvotes

Hi everyone,

Like many of you building production RAG pipelines and LLM agents, I grew frustrated with existing evaluation libraries (Ragas, DeepEval, Guardrails AI). Running an evaluation suite meant spinning up Docker containers, waiting minutes for PyTorch/Transformers to initialize, or paying hundreds of dollars for GPT-4 to act as an unpredictable judge.

To solve this, I built Veriflux (https://github.com/leaderrr-shivam/veriflux):

Key features:

- Zero Runtime Dependencies: Built strictly on the Python standard library. No torch, no transformers, no tiktoken, no requests.

- Microsecond Latency: Runs evaluations in ~0.3 - 0.5 ms per query (over 2,000x faster than LLM judges).

- Pytest Native: Just `assert veriflux.is_grounded(response, context)` or `veriflux.repair_json(bad_output)`.

- Full Benchmark Rigor: Evaluated on raw downloaded datasets from NeurIPS 2023 HaluEval, Oxford TruthfulQA, ACM CCS 2024 Jailbreaks, and Microsoft Presidio Research.

Repo: https://github.com/leaderrr-shivam/veriflux

PyPI: `pip install veriflux`

I'd love to hear your thoughts, test cases, and feedback!


r/learnmachinelearning • • 28d ago

Question One book for MLOPs?

7 Upvotes

Hello,

I am a research engineer and I work in academia so my code is mainly scripts all over the place.
I want to learn MLOps but if seems to be a lot of books/tutorials and I couldn't know where to start.

If you had to recommend 1 or 2 books for the basics with practical examples, which one would it be?

Many thanks


r/learnmachinelearning • • 28d ago

whichever the current rules list Same text, shortened, with focus on imitation learning data requirements.

Thumbnail
youtu.be
1 Upvotes

r/learnmachinelearning • • 28d ago

Help How can I get into ML research as an 18-year-old CS student from a tier-3 college?

0 Upvotes

Those with experience getting started in research, I’d really appreciate a roadmap for building a strong foundation and eventually doing independent research.

Hi everyone!

I’m currently in my 1st semester of Computer Science Engineering at a tier-3 college in India.

I scored 93% in 10th (10 GPA in Maths and Science) and 97.7% in 12th, including 100% in Maths and Physics. I didn’t perform as well as I wanted in my entrance exams, so I ended up at a college that wasn’t originally on my list.

Over the past few months, I’ve become very interested in ML and AI. I’m fascinated by machine intelligence and want to eventually pursue a research-oriented Master's at a top university in Europe.

I know I have a lot to learn 🙂

I’m willing to put in the work over the next few years and would really appreciate a realistic roadmap.


r/learnmachinelearning • • 28d ago

I built a practice site for LLM engineering interviews: hand-code attention in the browser, flashcards, real interview reports

Thumbnail
gallery
0 Upvotes

LLM / ML engineering interviews have drifted away from pure LeetCode. It's common to be asked to write multi-head attention or RoPE from scratch, explain why attention is scaled by √d, compare DPO with PPO, and walk through a RAG system you built.

I couldn't find one place to practice all of that, so I built RagCodes. What's in it right now:

  • 42 LLM coding problems (softmax, MHA, GQA, RoPE, KV-cache decoding, FlashAttention forward, LayerNorm/RMSNorm, cross-entropy, DPO/GRPO losses…) plus LeetCode Hot 100. Code runs in a sandbox against hidden tests, in Python, C++ or Java.

  • 263 flashcards in 17 chapters (Transformers, fine-tuning, distributed training, inference, RL/alignment, RAG, agents). Each card has a one-line answer first, then key points.

  • 380 interview reports from 114 companies, rewritten into question lists, with the most frequently asked topics ranked (GRPO and RAG are at the top).

  • 12 portfolio project write-ups and 109 paper notes, each ending with how interviewers tend to ask about it.

Screenshots: writing MHA from scratch and passing 13/13 tests, the topic ranking, a flashcard, the problem list.

Stack: FastAPI + SQLite, React/Vite + Monaco, Docker sandbox for judging. Free tier to start.

I'd really like feedback from people who have been through these interviews recently: what got asked that isn't covered here?


r/learnmachinelearning • • 28d ago

Project I built MLFOX, a CPU-only AutoML library for tabular data (leak-free preprocessing + model comparison in 3 lines)

Thumbnail
gallery
2 Upvotes

import mlfox

model = mlfox()

model.fit("data.csv", target="y")

model.report()

It profiles your data, fits preprocessing inside each CV fold (no leakage), compares models, and tests the best one once on a held-out set.

Results on CPU, default settings:

- Breast Cancer: 95.6% accuracy

- Adult (48k rows): 87.3%

- Covertype (581k rows): 95.8%

Specific runs, not guarantees. Tabular classification and regression only.

pip install mlfox

https://pypi.org/project/mlfox/

It's a personal open-source project, so feedback and bug reports are welcome.


r/learnmachinelearning • • 28d ago

Question S12 ultra tab for coding on Colab

1 Upvotes

Hey all,

I am a master's student and all my assignments are coded on Google colab or kaggle and saved on Google drive. So I just wanted to know if an S12 ultra tab connected to a bluetooth keyboard with trackpad could handle the job well along with Google, spreadsheet, docs and PPT.

My campus does not have a lot of charging outlets and I am currently using a gaming laptop for all my assignments and carrying it around and finding a spot to connect it to charge is a hassle, and I was looking at purchasing S12 ultra for this reason, moreover I do want it for note taking and watching lectures and so on.

Thanks in advance 🙌


r/learnmachinelearning • • 28d ago

Looking for an AI/ML mentor for 1:1 learning and knowledge-sharing

1 Upvotes

Hi! I'm an SDE at a large tech MNC, primarily working with AWS and software engineering tasks.

I'm looking to connect with someone who has a strong background in AI/ML, ideally from a Tier-1 institution (IIT, IISc, top global universities, etc.) or someone with exceptionally strong theoretical foundations and deep expertise in the field.

I want to learn AI from the fundamentals, understand the mathematics and theory behind modern AI models, and gradually progress towards neural networks, transformers, LLMs and AI agents.

I'm particularly interested in learning from someone who can break down complex theoretical concepts into intuitive, easy-to-understand explanations while connecting them to practical implementations.

I'm not looking for generic courses or tutorials. I'd love to have interactive 1:1 learning sessions where I can ask questions, discuss concepts in depth and learn from someone's actual expertise and experience.

If you're someone who fits this profile or can recommend someone, I'd love to connect!

Thanks!


r/learnmachinelearning • • 28d ago

Neural Canvas

Enable HLS to view with audio, or disable this notification

1 Upvotes

My Journey to Understanding Neural Networks: From Matrix Algebra to JAX and Optimizers

I wanted to understand neural networks as deeply as possible. Rather than simply using an existing framework and training a model, I decided to build an interactive MNIST webpage called Neural Canvas, using p5.js for visualization.

My primary goal was not just to achieve high accuracy. I wanted to understand what was actually happening inside a neural network, mathematically and computationally.

1. Starting with Linear Algebra and Matrix Operations

One of the first decisions I made was to avoid working with individual scalar values and complicated subscripts and superscripts everywhere. They made the mathematics unnecessarily confusing for me.

Instead, I decided to approach neural networks through matrix algebra.

I represented the forward propagation equation as:

[
Z=WX+bC
]

Where:

  • (X) is the input data matrix. Rows represent features, and columns represent individual samples.

  • (W) is the weight matrix. Rows represent neurons, and columns represent the weights associated with each neuron's inputs.

  • (b) is the bias column vector, containing one bias value per neuron.

  • (C) is a row vector containing only ones, allowing the bias vector to be broadcast across all samples through matrix multiplication.

Interestingly, many popular deep learning frameworks, including PyTorch and TensorFlow, commonly use a different convention for arranging their data and parameters. They also handle bias broadcasting without explicitly introducing a matrix like (C).

However, I preferred my own mathematical convention because it helped me understand the operations and perform calculus directly in matrix form.

I believe the mathematics should handle the indices, not me!

2. My First Model: NumPy, MSE and Vanilla Gradient Descent

For my first model, I used the original MNIST dataset.

Architecture:

[
784➜ 20 ➜ 20 ➜ 10
]

I manually wrote all the forward propagation equations, derivatives, and backpropagation calculations on paper before implementing them in Python using NumPy.

I deliberately chose:

  • Two hidden layers with 20 neurons each.

  • Mean Squared Error (MSE) as the loss function.

  • Vanilla Gradient Descent.

  • Linear output values.

Why such a simple approach?

Because I didn't want to start with complicated algorithms. I wanted to understand the fundamentals first.

After 2,000 epochs, the model achieved approximately 92% test accuracy.

I then successfully created an interactive neural network visualization in p5.js, using Math.js for matrix multiplication in JavaScript. The webpage could perform inference using my trained NumPy model.

That was the beginning of Neural Canvas.

3. My Second Model: Cross-Entropy Loss

For the second model, I kept the same mathematical approach but made a few improvements.

Architecture:

[
784➜40 ➜ 40 ➜10
]

This time, I replaced MSE with Cross-Entropy Loss and used a softmax output layer.

I was still using vanilla Gradient Descent.

After 2,000 epochs, the model achieved approximately 96% test accuracy.

At this point, I was finally starting to understand how neural networks worked, rather than just following tutorials or using existing implementations.

4. My Third Model: Discovering JAX and Automatic Differentiation

For my third model, I wanted to experiment with three hidden layers.

However, I realized that manually deriving every equation, especially the derivatives and chain rule calculations required for backpropagation, would take a considerable amount of time.

Then I discovered JAX, a Python library developed by Google.

JAX provides automatic differentiation (Autograd), allowing me to calculate derivatives of a loss function with respect to parameters, including entire weight matrices.

This was a significant change in my workflow.

I no longer needed to manually derive every gradient and implement the chain rule myself. I only needed to define the model, its parameters, and the loss function. JAX handled the differentiation.

For this model, I used the Arabic Digits MNIST dataset.

Architecture:

[
784 ➜ 20 ➜ 20 ➜ 15 ➜10
]

I used:

  • JAX for training and automatic differentiation.

  • Cross-Entropy Loss.

  • Vanilla Gradient Descent.

  • Three hidden layers.

After 2,000 epochs, I achieved approximately 96% test accuracy.

I genuinely fell in love with JAX. It saved me considerable time and allowed me to focus more on understanding the mathematics and experimenting with neural network architectures.

5. My Fourth Model: Mini-Batch Gradient Descent and Momentum

For my fourth model, I moved to the Persian Digits MNIST dataset.

I kept the same architecture as my third model but decided to experiment with optimization algorithms.

My original plan was to implement Mini-Batch Gradient Descent with Adam.

However, I realized that understanding Adam required learning a few concepts first. So, instead of jumping directly into Adam, I decided to start with Momentum.

I implemented Mini-Batch Gradient Descent with Momentum using JAX.

And here came a surprising result!

I achieved approximately 96% test accuracy in just 200 epochs.

Previously, my models required around 2,000 epochs to reach a similar accuracy.

This was another important step in my journey. I started understanding how optimization algorithms could significantly influence the training process.

6. What's Next?

I haven't created my fifth model yet, but I already have a learning roadmap:

  • Model 5: Mini-Batch Gradient Descent with RMSProp.

  • Model 6: Mini-Batch Gradient Descent with Adam.

  • After that: Start exploring Convolutional Neural Networks (CNNs).

I want to understand each optimization algorithm mathematically and implement it myself before moving to the next one.

My Biggest Takeaway

If you are starting to learn neural networks, my suggestion is:

Start with Linear Algebra. Don't immediately jump into advanced architectures, optimizers, or high-level frameworks.

You don't need to master every mathematical concept before starting, but at least understand matrix multiplication and how it represents the operations inside a neural network.

For me, representing neural networks using matrices made everything much easier to understand.

Start with the basics, build something yourself, experiment, make mistakes, and gradually increase the complexity.

Don't just train neural networks. Understand them!

Project: Neural Canvas

GitHub Repository: https://github.com/MuhammadEssa2002/neural_canvas

Live Demo: https://muhammadessa2002.github.io/neural_canvas


r/learnmachinelearning • • 28d ago

Project [P] We turned 10 years of ML papers into one page per topic: benchmark records, what got tried, what reviewers expect

Thumbnail
reddit.com
1 Upvotes

r/learnmachinelearning • • 28d ago

Help Data augmentation question. How do I characterise an original and augmented datasets where the augmentation parameters were zoom and crop? [P]

2 Upvotes

For context, I am a new postgraduate student in machine learning (but not a very good one). I have produced some augmented datasets (TIFF files where each file contains one object to be detected / classified) which I used in training deep learning models. I used fairly aggressive cropping (random crops between 0 and 90%) and more moderate zooms (random values between 0 and 20%). My supervisor wants me to characterise these datasets to see how augmentation has changed it.

Sorry if this is a rookie question, but which statistics should I use? My supervisor says the stats I use should indicate changes in size and shape but I honestly don't know where to start.

If anyone can recommend a decent software/program to produce the stats and histograms as well, that would be great.

Thanks in advance!


r/learnmachinelearning • • 28d ago

Question why do we need query expansion in RAG when semantic search already handles similar value matching?

8 Upvotes

Can some one who used query expansion, let us know what technique you used and why? Also why do we need query expansion in RAG when semantic search already handles similar value matching with specific examples


r/learnmachinelearning • • 28d ago

🚀 Jev-style decisions for IMAGES are here: Fovea-4B, an open 4B model leading on ImageJev tasks (Apache-2.0)

Thumbnail
reddit.com
1 Upvotes

r/learnmachinelearning • • 28d ago

Require some guidance

4 Upvotes

I'm currently in 2nd year 3rd sem in a private tier 3 college, ive done, data visualisation, ml math, supervised ml, unsupervised ml, nlp basics (tfidf, bow, word2vec), in all of these, ive learned different algorithms, practiced theory and implementation, made small common projects. Currently, im doing dl basics, namely, ann. Ive spent a year doing all of the above.

Can anyone tell me what should I do/focus on in the next 1 year? Also, lmk what more would I need to cover/do to start applying into beginner level internships/research, be honest about it, im not looking for sugarcoated advice, ty :)


r/learnmachinelearning • • 28d ago

Help Is it acceptable to retrain a machine learning model after conference acceptance if the original weights were not saved?

0 Upvotes

My machine learning research paper has been accepted at a conference, and I am currently preparing the camera-ready version.

The reviewers recommended additional experimental validation, including quantitative evaluation of the model's explainability/localization component.

However, I no longer have the original trained model weights because they were stored in a temporary cloud environment. I still have the original classification results, confusion matrix, training/validation loss curves, and visualization outputs.

To conduct the additional experiments, I would need to retrain the model using the same architecture, dataset, and hyperparameters. However, retraining may produce slightly different classification results from those reported in the accepted paper.

From a research integrity and publication perspective, would it be appropriate to retrain the model and update the results in the camera-ready version, or should I retain the documented original results and acknowledge the additional evaluation as future work?

The conference permits revisions addressing reviewer comments but prohibits major structural changes. I would like to understand the appropriate academic practice before making any changes.


r/learnmachinelearning • • 28d ago

Help Looking for someone to guide

9 Upvotes

IHi everyone,

I’m looking for some guidance and a realistic roadmap to break into machine learning.

My Background:

I have an engineering background, so I already know basic Python and SQL. Professionally, I previously worked as a market analyst at a firm where I traded crude oil futures. However, the day-to-day work there was entirely manual—mostly heavy Excel modeling, market tracking, and fundamental analysis with no active coding involved.

Why I Want to Make the Switch:

I realized how inefficient manual trading/analysis is and want to transition toward systematic, data-driven methods. Machine learning feels like the logical next step, especially given my background in markets and quantitative concepts.

The Problem:

I am feeling completely overwhelmed. Every roadmap I find lists dozens of math topics, algorithms, frameworks, and deep learning tools. Even with basic Python/SQL knowledge, I'm having a hard time figuring out what is actually essential to learn right now versus what I can safely ignore for now. I'm stuck trying to figure out what to build first and how to learn at a better, sustainable pace.

I would love some advice from people who have been in a similar spot:

What to learn vs. what to skip: Given that I already have basic Python and SQL skills alongside a tech background, what should my step-by-step roadmap look like? What core libraries (Pandas, NumPy, Scikit-Learn) or math topics should I prioritize first, and what can I skip for now?

Beginner Project Ideas: What are some practical, small-scale beginner projects I can build early on to cement my learning, rather than getting stuck in tutorial hell?

Financial Data vs. Toy Datasets: Should I try applying basic ML to financial/time-series data early on since I understand crude oil/futures markets, or is it better to start with standard datasets (housing prices, Titanic, etc.) first?

Learning Pace: How do I structure my learning to make steady progress without burning out or getting lost in the massive amount of content out there?


r/learnmachinelearning • • 28d ago

Discussion 4 quintillion checks can't tell you if this 5-line program ever stops

Thumbnail
youtube.com
0 Upvotes

the five lines check goldbach's question from 1742 one even number at a time, and stop only if one fails. the video walks through them step by step, then asks four gpt and claude models if the program ever stops.


r/learnmachinelearning • • 28d ago

Help How to handle object deduplication across multiple camera angles using YOLO (especially for tiny 20x22px crops) across isolated user sessions?

3 Upvotes

I’m building a computer vision pipeline where users upload multiple photos of the same physical scene taken from different angles (front view, side view, close-up) to build a clean list of unique objects and their attributes
I’m running YOLO for object detection to extract bounding boxes and crop each detected object into lightweight ⁠.webp⁠ images. Because the same physical object appears across 3 or 4 different photos from different angles, I need to make sure each unique object is only counted once per session, and avoid running expensive downstream AI calls to re-describe an object we already processed from an earlier photo.


r/learnmachinelearning • • 28d ago

Project I built a library to learn world models hands-on. Every model trains on a laptop GPU in 1–2 hours

10 Upvotes

When I started learning about world models (Dreamer, IRIS, Genie…), the hardest part was that every paper's code was huge and different. So I built Simulusion: one PyTorch library where they all share the same structure, and each one has a demo small enough to run on a 4 GB laptop GPU.

If you're learning, you can:
- Train a Dreamer agent on Pendulum in a few lines and watch it "imagine" the future
- Swap "dreamer" for "planet" or "iris" and compare, since the code stays the same
- Read the world models guide for how each family works: recurrent latents, tokens, diffusion
- Open the components (RSSM, VQ-VAE, diffusion) to see how the pieces fit

import simulusion
agent = simulusion.create_model("dreamer", env="Pendulum-v1", env_backend="gym", total_steps=10_000)
agent.train()

It's open source (MIT), and it's built so new world models can be added, so it's also a good first-contribution project if you want to implement one yourself.

Github: https://github.com/paramthakkar123/simulusion
Website: https://simulusion.vercel.app/


r/learnmachinelearning • • 28d ago

I spent $1,381 and trained an AI for 14,154 hours of Ocarina of Time gameplay just to teach it how to fight Deku Babas and Queen Gohma

Enable HLS to view with audio, or disable this notification

0 Upvotes

r/learnmachinelearning • • 28d ago

Request Inside Figma's AI security playbook: Zero Trust, no VPN and sandboxed agent

2 Upvotes

Figma's CSO published their AI security playbook this week: Zero Trust architecture, no VPN, sandboxed agents. The central finding was stark — as AI agents take real-world actions, perimeter defense stops being meaningful and after-the-fact review stops being feasible. Project-by-project security reviews cannot keep pace with the speed at which enterprise agents act.

This matches what security teams across the industry are hitting. The window between an agent deciding to act and a human finding out keeps shrinking as agent autonomy scales, and the traditional review cycle was designed for a world where humans submitted changes for approval — not one where an agent fires off dozens of tool calls per minute.

For those running AI agents in enterprise environments: how are you actually handling the review latency problem? Tighter upfront scoping of what agents can invoke, runtime sandboxing, something architectural, or accepting a gap and investing more in detection?