正在加载视频...

视频加载失败

➡️ Machine Learning from Scratch, part 35: supervised vs unsupervised learning. In supervised learning every training example comes with the right answer, a label. The model guesses, a loss function measures how wrong the guess was, and training makes that error smaller step by step. In unsupervised learning there...

26,000 次观看 • 1 个月前 •via TikTok

0 条评论

暂无评论

原始帖子的评论将显示在这里

相关视频

➡️ Machine Learning from Scratch, part 38: cross entropy. Softmax (part 37) turns the raw scores of a network into one probability per class. Cross entropy is the loss function that scores how wrong those probabilities are, with one number. It looks only at the probability of the right class and takes minus its natural log. Right with 99 % costs 0.01. An unsure answer that gives the right class 40 % costs 0.92. If the network is 99 % sure of a wrong class, the right class gets 1 % and the cost jumps to 4.61. Training averages this cost over all examples and pushes the average down. Together with softmax, the push on every raw score is simply the predicted probability minus the truth, so the right class is pushed up, the wrong classes are pushed down, and a confident mistake gets the strongest push. With squared error through softmax, that push on a confident miss can be much weaker, which is one reason classifiers usually learn with cross entropy. Our own run, nothing downloaded. cross_entropy.py (16 lines of numpy) prints the three costs above, makes 300 points in three classes and trains the small network from part 37 (2 inputs, 4 hidden neurons, 3 output neurons) with cross entropy. The average loss falls from 1.01 to 0.13 in 1,000 steps. After training it gets 283 of the 300 points right, and the 17 it still gets wrong make up 73 % of the remaining loss. Honest notes: we train and measure on the same 300 points, so this is the training loss. On these easy points, the same network trained with squared error ends up about as accurate (284 of 300). The difference shows in the push on single confident mistakes: for our most confident miss at the start, 0.98 with cross entropy against 0.07 with squared error. The 3D surfaces show both losses over two raw scores of that real point, with the same 12 steps on each. #machinelearning #ai #crossentropy #neuralnetwork #deeplearning

MachineLearningToGo

11,400 次观看 • 1 个月前

➡️ Machine Learning from Scratch, part 37: softmax. Every neuron first adds up its inputs times their weights, then an activation function reshapes the result. Without activation functions, any number of layers would act like one single linear layer. Softmax is the special activation at the very end of a network that sorts things into classes. The last layer has one output neuron per class, and each one gives a raw score that can be any number, even negative. Softmax looks at all of them at once: it raises e to the power of each score, then divides by the sum. Now every output lies between 0 and 1, all outputs add up to exactly 1, and the class with the highest one is the prediction. Unlike an S curve on each neuron, softmax couples the whole layer: if one score rises, the other probabilities fall. Our own run, nothing downloaded. softmax.py (16 lines of numpy) makes 300 points in three classes and trains a small network with 2 inputs, 4 hidden neurons and 3 output neurons on 200 of them. On the 100 new points it gets 90 right. For the point (-1, 0) it says 95% class 1, 1% class 2 and 4% class 3. Honest notes: these percentages are the model's own confidence. On the test points our model is 94.9% sure on average but right only 90% of the time, so it is a bit too confident, which is common for neural networks. Our learning rate sits close to the edge of stability, so a tiny change in the start can move the last digit (we show our exact run). The 3D hills are the real probabilities of our trained network over the input plane. #machinelearning #coding #softmax #neuralnetwork #deeplearning

MachineLearningToGo

16,500 次观看 • 1 个月前

➡️ Machine Learning from Scratch, part 31: the transformer. A transformer turns every token into a list of numbers, adds its position, and then lets every token look at the others. That step is called attention: each token has a query (what am I looking for), a key (what do I contain) and a value (what I pass on). The better a query matches a key, the more of that value flows in. Real transformers repeat this in many layers with several attention heads each. The design comes from the 2017 Google paper "Attention Is All You Need" by Ashish Vaswani and colleagues, first used for translation. A large language model is a transformer trained to predict the next token, again and again, on a huge amount of text. Our own run, nothing downloaded. attention.py is one self-attention layer in 16 lines of numpy. Every word gets a query, a key and a value of 8 numbers, starting random, trained from scratch with hand-written backpropagation on 192 made-up sentences like "the dog ate the carrot because it was hungry". The task: find out which pet "it" means. On 64 new test sentences "it" puts 99.95 percent of its attention on the right word on average (the lowest single sentence gets 99.9 percent; the program prints this as 100%). Before training it was 10 percent, spread evenly. The cat sentence from the video is one of the test sentences. Honest notes: our task is easy on purpose. Every sentence has exactly one pet, so "it" only has to learn to look for pets, and it learns that within the first pass. Real sentences with two candidates need more context, which is what many layers are for. Our small version has no positions, no scaling, no mask, one head, and only "it" asks a question. Every word of the test sentences also appears in training; the combinations are new. The 3D space in the video shows the real keys of our model, projected to three axes (two of them stretched so you can see them). The stacked layers are a sketch. #machinelearning #ai #transformer #python #llm

MachineLearningToGo

81,200 次观看 • 1 个月前

➡️ Machine Learning from Scratch, part 15: a recommender, the kind of algorithm that picks what your feed shows you. Our app is simulated: 300 people and 60 videos. Every person has a hidden taste, every video has a hidden style, and each person has watched only about 12 of the 60 videos. All the algorithm ever sees is who liked which of the videos they watched. How it learns: every person gets two numbers, and every video gets two numbers. Think of them as arrows on a map. For every video a person has seen, the two arrows turn into a chance of a like with the sigmoid from part 2. The algorithm compares that chance with what really happened and nudges both arrows a little. That is gradient descent from part 8, and the whole method is called matrix factorisation. The results, all measured on the videos nobody showed it: After 25 rounds it guesses 85.0% of the hidden likes right. After 3000 rounds it gets 87.8% right. The best any method could do here is 91.1%, because some likes are just random. For every person it recommends the three unseen videos with the strongest match, and 98% of them are videos the person really likes. A random unseen video gets a like 51% of the time. The first person on the list watched only 5 videos. From those five it guessed the other 55 and got 51 of them right. We ran the same program on 20 different simulated apps, and it always landed between 84 and 88%. Real apps use hundreds of numbers for every person and every video, plus signals like watch time and skips. The core idea stays the same: learn numbers for people and for videos, and match them. #machinelearning #ai #recommendersystem #python #coding

MachineLearningToGo

89,100 次观看 • 1 个月前

➡️ Part 9 of learning ML code from scratch Six weights, one wrong answer, and not one of them knows it was at fault. Backpropagation is how they find out. Two questions guide the video: what even is backpropagation, and why do models need it? Step 1, the forward pass. Two numbers go into a tiny network, run through a hidden layer, and one number comes out. Ours says 0.700. We wanted 1.0, so square the difference and the loss is 0.09. That single number is how wrong the model is. Step 2, the question. Six weights produced that answer together. Which of them is to blame, and by how much? Step 3, the one idea. Change a single weight by a tiny amount and watch the error move. How much the error changes per unit of weight is the gradient of that weight. In the video you can see it happen: the weight wobbles and the error bar answers. Step 4, the shortcut. Every weight running into the same neuron starts from one shared number, the blame of that neuron. Multiply that blame by the value each weight carried and you have its gradient. One blame, computed once, and every weight into that neuron gets its own gradient from it. That is why backpropagation is fast enough to train anything at all. Step 5, backwards. The blame starts at the output and every layer hands its share to the layer in front of it, back through the same network the data came forward through. It goes layer by layer, and inside one layer every neuron is done together. Step 6, the update. The optimizer moves every weight against its own gradient, the whole weight matrix in one go, so no weight waits for its turn. All six gradients here are negative, so all six weights go up. After one step the answer reads 0.769. After sixty it reads 0.968 and the error is down to 0.001. The honest part: every gradient in the video was checked against the measured change of the error. Move that one weight, see what the error does, divide. Backprop and the measurement agree to nine decimal places, otherwise nothing would have rendered. #machinelearning #backpropagation #neuralnetworks #python #coding

MachineLearningToGo

212,200 次观看 • 1 个月前

➡️ Machine Learning from Scratch, part 47: the Hopfield network. In 1982 the physicist John Hopfield described a network that works as a memory, and 42 years later this work was part of the Nobel Prize in Physics. Each neuron is one pixel that is either on or off, and every neuron is connected to every other neuron, so 100 pixels need 4,950 connections. There are no layers: signals go back and forth until the network settles. Each neuron takes a weighted sum of its inputs and switches on if the sum is positive, off if it is negative. Storing a picture is simple: for every pair of pixels with the same colour the connection gets stronger, otherwise weaker. Every stored picture becomes a valley in the energy landscape, and no switch can ever raise the energy, so a noisy picture rolls downhill into the nearest stored memory. The code (hopfield.py, 16 lines of numpy, pictures in pics.txt) stores three 10 x 10 pictures, a heart, a house and a smiley, and flips 30 of the 100 pixels in each. After a single pass over all neurons all three come back exactly; the energy of the heart falls from -6.90 to -48.90, the energy of the stored heart. With 100 neurons and random patterns (10 flipped pixels, 20 runs) it recalls 5 patterns every time, 10 patterns in 94.5 % of the cases, 14 in 68 %, 20 in about one in four (24 %) and 30 in 1 %. Honest notes: the weights are kept as whole numbers (100 times the Hebb weight), so a sum of exactly zero switches the neuron on, as the rule says. The landscape in the video is a picture of the idea; the valley floors and the height of the rolling ball are the real energies from the run. #machinelearning #ai #coding #neuralnetworks #nobelprize

MachineLearningToGo

12,000 次观看 • 17 天前

Former Meta Chief AI Scientist Yann LeCun on the three paradigms of machine learning — and why the third is what made ChatGPT possible: Here's each one, and where it breaks. First, supervised learning. You tell the machine the answer. "You show it a picture, let's say of a table, and you tell it this is a table. So it's supervised because you tell it what the correct answer is." Get it wrong, and the machine rewrites itself: "The system computes its output, and if it says something else than table, then it's going to adjust its parameters, its internal structure, so that the output it produces gets closer to the output you want." Repeat at scale and something more than memorisation appears: "Eventually the system will find a way to recognize every image you trained it on, but also images it's never seen that are similar to the one you train it on. This is called a generalization ability." The limit: a human has to supply every single answer. That doesn't scale to the size of the internet. Second, reinforcement learning. You don't give the answer, only a verdict. "You don't tell the system what the correct answer is. You only tell it whether the answer it produced was good or bad." Learning to ride a bike, essentially: "You try to ride a bike and you don't know how to ride the bike and after a while you fall. So you know you did something bad and so you change your strategy a little bit. And eventually you learn how to ride a bike." For years the field assumed this was the closest thing to how animals actually learn. Yann LeCun's verdict: "Now it turns out reinforcement learning is extremely inefficient." It dominates wherever failure is free: "It works really well if you want to train a system to play chess or play go or poker, because you can have the system play millions and millions of games against itself and basically fine-tune itself. But it doesn't really work in the real world." The limit, in one image: "If you want to train a car to drive itself, you're not going to do it with reinforcement learning. It's going to crash thousands of times." On robotics he's careful rather than dismissive: "Reinforcement learning can be part of the solution, but it's not the complete answer. It's not sufficient." Third, self-supervised learning. You tell the machine nothing at all. "And this is what has enabled the recent progress in natural language understanding and chatbots." The strange part is that you stop asking for a task: "You don't train the system to accomplish any particular task. You just train it to basically capture the structure..." The method is deliberate sabotage: "You take a piece of text, you corrupt it in some way, by for example removing some words, and then you train a big neural net to predict the words that are missing." And one narrow version of that trick runs every chatbot on Earth: "A special case of this is that you take a piece of text and the last word in that text is not visible, and so you train the system to predict the last word in that text — and this is the way large language models are trained on." So why did the third one win? Supervised learning needs a human. Reinforcement learning needs a crash. Self-supervised learning needs neither — because the missing word and the correct answer are the same thing. The data grades itself.

Big Brain AI

49,293 次观看 • 3 个月前

➡️Machine Learning from Scratch, part 52: tokenization. Before a language model reads your text, the text is cut into small pieces called tokens: whole words, parts of words, single letters or punctuation marks. Every token has a fixed ID in a vocabulary, each ID gets its own vector (the embedding), and only these vectors go into the network. Whole words would need a gigantic vocabulary and fail on every typo, single letters make every text very long, so tokens sit in the middle. The code (bpe_reel.py, 16 lines of pure Python) runs byte pair encoding on a short self-written text of 186 characters: it starts with single characters, finds the most frequent pair of neighbours and merges it everywhere, 30 times. After 30 merges the text needs only 67 tokens instead of 186 characters. With the 30 learned merges, "strawberry" becomes straw | berr | y, three chunks with the IDs 123, 105 and 89, so the three r's are hidden inside the chunks. Honest notes: one tiny text, written with the words strawberries and berries in it so that the strawberry split comes from this run; real tokenizers learn tens of thousands of merges on huge amounts of text, and how a real model splits a word depends on its own vocabulary. The vector space is a tiny self-trained model (12 dimensions, shown in 3) on a self-written text; king and queen, cat and dog are measured nearest neighbours there. Sources: Sennrich, Haddow, Birch 2016, "Neural Machine Translation of Rare Words with Subword Units" (BPE for language); Gage 1994 (BPE as data compression). #machinelearning #ai #tokenization #llm #claude

MachineLearningToGo

17,500 次观看 • 4 天前

➡️ Machine Learning from Scratch, part 48: the Boltzmann machine. In 1985 Hinton, David Ackley and Terrence Sejnowski published how a Boltzmann machine learns, starting from the Hopfield network of part 47. Like the Hopfield network it prefers pictures with low energy, but it also has hidden units next to the visible pixels, and its units switch on by chance: the sigmoid turns the weighted sum into a probability. So the machine never settles and visits low energy pictures more often. We use the restricted version, with connections only between the two layers. The code (boltzmann.py, 16 lines of numpy) trains a restricted Boltzmann machine with 9 visible and 8 hidden units on all 14 bars-and-stripes pictures of 3 x 3 pixels, with contrastive divergence (one dream step per round, 5,000 rounds). Then 1,000 dreams start from pure noise and switch back and forth 100 times: 855 of them became one of the 14 pictures, from 3 times for the empty picture to 142 times for one with two bars. Sources: Nobel Prize in Physics 2024, press release of 8 October 2024 (Hopfield and Hinton, "for foundational discoveries and inventions that enable machine learning with artificial neural networks"); D. H. Ackley, G. E. Hinton, T. J. Sejnowski, "A Learning Algorithm for Boltzmann Machines", Cognitive Science, 1985; G. E. Hinton, "Training Products of Experts by Minimizing Contrastive Divergence", Neural Computation, 2002. Honest notes: the pictures do not come up equally often, because one dream step per round is only a shortcut for the real learning rule. When two of the 14 pictures are left out of training, our small machine does not dream them up; new examples of the same kind come from large machines trained on many examples. #machinelearning #ai #boltzmannmachine #neuralnetworks #nobelprize

MachineLearningToGo

14,700 次观看 • 16 天前

Using Claude Fable 5, I built a model that predicts the entire 2026 FIFA world cup.. every single game, not just the final.. so let me break the whole thing down. what it does, how it works, and exactly how i built it.. #1 First what it does: it predicts all 104 games of the tournament. not just who lifts the trophy, but every group match, every knockout, the full path from the round of 32 to the final.. everything lands in one dashboard: > group stage, every match with each team's win % and the chance of a draw > standings, how all 12 groups are projected to finish > bracket, the full knockout tree with each team's odds of advancing > champion odds, who's most likely to actually win it all and it doesn't freeze after one prediction. the moment a real game is played, it locks that result in and re-runs everything around it. so the odds move live as the tournament goes, week by week you watch favorites rise and contenders collapse. #2. How it works: the core idea is simple. the model only ever predicts one thing, a single match. the real trick is the repetition. it learns from decades of match history, then plays the whole tournament out from the first game to the final, tens of thousands of times. each run it records who advanced and who won. do that enough and you stop getting one guess and start getting real odds, one team lifts the trophy in maybe 14% of the runs, another in 9%, and so on. #3. So, how i built it ? i didn't hand-write most of the code. i broke the project into 4 pieces, described each one to fable, and let it build while i focused on getting the football logic exactly right. - The data every international match going back over a century, around 50,000 games, plus each team's elo rating, which is the truest measure of strength, and the official 2026 schedule. garbage data means garbage predictions, so this part mattered most. - The features i turned that raw history into signals the model can learn from, the elo gap between the two teams, recent form, goals scored and conceded, and a home boost for the hosts, usa, canada and mexico. - The model for each match it predicts the expected goals for both sides, then turns that into win, draw and loss probabilities plus a likely scoreline. that's what feeds the simulation. - The tournament engine this was the hard part. the 2026 world cup is brand new, 48 teams, 12 groups, a round of 32 that's never existed before, and 8 "best third-placed" teams that slot into the bracket by a fixed fifa table. even the group tiebreakers changed this year, head to head now counts before goal difference. get any of it wrong and the whole bracket falls apart, so i built it carefully and tested the format until it was exact, then wrapped it in a simulation loop that plays the tournament out tens of thousands of times. and the last piece, the live part. as real results come in, they get locked, and only the unplayed games get re-simulated. that's what makes it a living model instead of a one-time prediction. all of it outputs to a clean dashboard you can actually read and screenshot.. right now, before kickoff, it already has a clear favorite to lift the trophy.. 👀 btw who's your pick to win the 2026 world cup?

Axel Bitblaze 🪓

63,796 次观看 • 5 个月前

New framework: Kick down your robot, it will get back up every time 🥋 Chinese startup RoboParty is a Beijing startup founded April 2025 by Huang Yi, originally shipping ROBOTO ORIGIN, the world's first full-stack open-source bipedal humanoid. They released UFO: Unsupervised Reinforcement Learning Framework for Humanoid Control. DEFINITIONS -> what differs is where the learning signal comes from: - SUPERVISED: humans supply the right answers (labels), the model imitates them. - UNSUPERVISED: no answer key, the model finds structure in raw data on its own. - REINFORCEMENT LEARNING: no answer key either, the model tries things and a reward scores each attempt. → UNSUPERVISED RL: trial and error where the agent invents its own rewards, instead of engineers hand-writing one per task. REPRESENTATION LEARNING: compress raw states into a useful internal map. TEMPORAL DISTANCE: distance on that map is "how many steps from A to B." CONTRASTIVE: trained by pulling together what's close in time, pushing apart what isn't. -> CONTRASTIVE TEMPORAL-DISTANCE REPRESENTATION LEARNING: the model builds an internal map of body states where distance means how many steps it takes to get from one to another. It is trained by contrast: states that occur close together in a movement get pulled together in the map, randomly paired states get pushed apart. UFO is an open-source training framework that teaches humanoid robots skills, like getting up, walking, goal-reaching, teleoperation, without reference motions -> no motion-capture or human-video demonstrations to imitate. Its core is TeCH, a contrastive temporal-distance representation-learning algorithm: the robot explores, builds pseudo-goals by temporal rolling, and learns goal-conditioned policies from a single unified progress reward. One framework trains five different robots (Unitree G1/H1, RoboParty RP0/RP1, AgiBot X2) with automatic config conversion in ~2–3 hours per robot! The real novelty here "no demonstrations at all". No data-collection arms race,the dominant humanoid-locomotion recipe is tracking: imitate mocap/retargeted-human reference trajectories. The robot self-generates goals from its own exploration and learns from a progress reward, needing zero reference motion data. Everybody else is fighting over data acquisition, while this team just teleports out of the race entirely (inb4 "competition is for losers 💀 ). This strategy reminds me of the DeepSeek playbook applied to robots: open-source the whole stack to become the global default and commoditize everyone else. RoboParty is giving away hardware and now control software (UFO) to be the Android of humanoids. Yet another reason for the US to ban Chinese open models perhaps 🥶 ? What I also really like about this approach is the cross-embodiment infrastructure, one framework trains Unitree G1/H1, RoboParty RP0/RP1, and AgiBot X2 with automatic configuration conversion. Just like Physical Intelligence, RoboParty seems to place itself as a neutral hardware agnostic middle man. Also woth mentioning: their ability ot perform stable skill injection, e.g. adding a cartwheel without forgetting how to walk. A common failure of RL humanoid policies is that teaching a new agile skill destabilizes the existing ones (catastrophic forgetting). UFO claims you can inject rare motions (cartwheel) without collapsing learned behavior. If it holds, that's a significant incremental/continual skill-learning! But again, I have to underline it: no arXiv, no external validation, no success-rate numbers. -> robotics badely needs an independent unbiased evaluator imho. Still, look at that cool demo: robot is getting kicked and pushed around (serious disturbance) during teleoperation (controlled the person at the back wearing the VR headset), and still managed to always get back up. This is some serious demonstration of stability and robustness!

Léo

36,184 次观看 • 3 个月前