Перейти к содержимому

Min & Max Backward in Autograd | Tie Case Explained | Make Your Own PyTorch #27

Byte यंत्र

0:00 / 0:00

Min & Max Backward in Autograd | Tie Case Explained | Make Your Own PyTorch #27

4 просмотра · 10 дн. назад
Byte यंत्र
3 подписчика
4 просмотра · 10 дн. назад
What happens when multiple elements share the same minimum or maximum value? How should Autograd distribute gradients? 🤔 In Episode 27 of Make Your Own PyTorch, we explore and implement the backward logic for Min and Max reduction operations in our JavaScript-based Tensor library. We go beyond finding the minimum or maximum value and focus on what happens during backpropagation. We examine how the backward pass identifies the matching elements and routes gradients to the correct input positions, including the important tie case. In this video, you'll learn: How Min and Max reduction backward works How to identify minimum and maximum positions How argmin and argmax masks help determine gradient locations How gradients flow from the output back to the input tensor What happens when multiple elements share the same minimum or maximum How to handle tie cases in backward logic How to implement MinBackward and MaxBackward in JavaScript How reduction operations fit into our custom Autograd engine This is Episode 27 of the Make Your Own PyTorch series, where we build a PyTorch-like Tensor library from scratch using JavaScript and explore the internal mechanics of modern deep learning frameworks. We're implementing Autograd one operation at a time, understanding both the mathematics and the code behind gradient computation. #Autograd #MinBackward #MaxBackward #Backpropagation #AutomaticDifferentiation #PyTorch #ReductionOperations #GradientComputation #JavaScript #MachineLearning #DeepLearning #PyTorchFromScratch #CodingInHindi #ProgrammingInHindi #MakeYourOwnPyTorch