I control the AI empire thanks to the geniuses in my group.
Chapter 53: Graphics cards are not for playing games!
The shopkeeper said, "This card is top-tier; it works exceptionally well for gaming. Take it home and try it out. If you don't like it, you can take it off and return it to me."
Su Zhou looked at the numbers on the configuration list and silently did some calculations in his mind.
The whole set cost 5,100 yuan. After deducting the old machine recycling fee and the 300 yuan discount, I actually paid 4,220 yuan, and I still had 1,810 yuan left.
"Deal," Su Zhou said readily.
The boss was very efficient; he unpacked, assembled, routed, organized, installed the operating system, and transferred data from the old computer all in one go.
Su Zhou stood by and watched, occasionally handing over a screwdriver, and the two chatted casually.
After installation and powering on for testing, Su Zhou's eyes lit up the moment the BIOS interface popped up.
It was already 2 p.m. when I got home.
Su Zhou connected the new computer to the monitor and keyboard, pressed the power button, and the sound of the fan was different. The old computer sounded like a tractor starting up when it turned on, but this one was almost silent.
In high spirits, Su Zhou finished setting up the development environment, closed his eyes, and mentally reviewed the entire neural network architecture from beginning to end.
The red envelope given by Rosenblatt played its biggest role at this moment.
A complete information flow process from input to output appeared in Su Zhou's mind. Each layer of sensor received, processed, and transmitted signals, just like the progressive layers of neurons in the human brain.
He opened the editor and began writing code to build the most basic perceptron model.
This was Rosenblatt's starting point, and it is also the foundation of all neural networks.
A perceptron is essentially a function that receives multiple inputs, multiplies them by their respective weights, sums them, and then uses an activation function to determine whether to activate it.
Just like a neuron in the human brain, when an electrical signal comes in, it fires if the signal is strong enough, and goes silent if the signal is weak enough.
Su Zhou used the C language he learned during his leave of absence to write a very simple perceptron. The input is two numbers and the output is 0 or 1.
I ran it and it worked, but it was pointless. A single sensor couldn't even handle slightly complex calculations.
Now he needs to stack the sensors.
A single neuron can't do anything, but billions of neurons connected together form the human brain.
Similarly, a single perceptron is useless, but if you arrange hundreds or thousands of perceptrons into layers, with full connections between the layers, information flows from the input layer to the hidden layer and then to the output layer. This is a multilayer perceptron, which is the most basic neural network.
This process requires a large number of matrix operations.
The output of each layer is the output of the previous layer multiplied by the weight matrix, plus the bias, and then passed through the activation function.
Su Zhou worked out the matrix on paper, and after confirming that there were no problems, he began coding.
Leibniz's ability to analyze all phenomena was of great help here.
Matrix operations are essentially linear transformations, and linear transformations are essentially spatial mappings.
Su Zhou doesn't need to memorize formulas; he can intuitively imagine the data processing procedure.
The network is set up, but the weights are randomly initialized, resulting in garbage output.
How can we make learning possible online?
The answer is the backpropagation algorithm. First, calculate the error between the output and the correct answer. Then, propagate this error back from the output layer, calculate the contribution of each weight to the error layer by layer, and finally adjust the weights according to the contribution.
This is where calculus truly shines.
The core of backpropagation is chain-like differentiation, which is a series of partial derivatives nested within each other.
This kind of thing, if written in a textbook, would make graduate students scratch their heads and go bald, but in Su Zhou's eyes, the chain rule is like a river flowing backwards, with water surging from downstream to upstream, splitting proportionally at each fork, and ultimately every drop of water can be traced back to its contribution to the rise and fall of the water level.
With the three skills combined, the code was written exceptionally smoothly.
By 8 p.m., Su Zhou had set up a three-layer fully connected neural network with 784 nodes in the input layer, corresponding to a 28×28 pixel handwritten digit image, 128 nodes in the hidden layer, and 10 nodes in the output layer, corresponding to the ten digits from 0 to 9.
He downloaded a handwritten digit dataset from the internet, consisting of 60,000 training images and 10,000 test images, uploaded it, and pressed enter.
The numbers on the screen started scrolling.
Su Zhou leaned back in his chair, glanced at the progress bar and timer in the lower right corner, and began to do mental calculations.
How many floating-point operations are required for each of the 60,000 images to go through forward and backward propagation?
A three-layer network, 784×128 plus 128×10, each layer also has an activation function and gradient calculation...
After finishing the calculation, Su Zhou's expression turned somewhat unpleasant.
At the current pace, completing his pre-set training plan, including parameter tuning, increasing network depth, and switching to a larger dataset, will conservatively take at least two months.
Two months is way too long to find out the results!
We need to think of a way.
He switched out of the terminal, opened a browser, and plunged into various technical forums.
The screen was filled with hardware enthusiasts fiercely debating. Some were boasting about the latest CPU architecture, while others were discussing how to overclock a dual-core processor, pushing the clock speed up by a fraction of a GHz to squeeze out the last bit of performance.
After looking around, Su Zhou shook his head.
Even if you overclock this CPU to the point of smoking, at most you'll only improve performance by 20%. What's the essential difference between two months and one and a half months?
He stared at a diagram of a CPU's core architecture on the webpage, and suddenly it dawned on him: he was going in the wrong direction!
Everyone is working hard on CPUs, but CPUs are inherently unsuitable for running neural networks!
The CPU is like a top-notch mathematics professor.
Calculus, probability theory, topology—he can solve any kind of advanced problem, and he's open to all kinds of challenges.
However, its problem lies in its limited capacity and small number of cores, usually only two or four.
This is like a professor who, despite being highly skilled, can only bring two or three students into his office for tutoring at a time.
Its massive and complex control unit was designed to handle all sorts of unpredictable logical branches and instruction jumps.
What is the training process for a neural network?
Massive amounts of matrix multiplication, vector addition, and element-wise activation. There are no complex logical judgments, no convoluted conditional branches, only tedious, repetitive, and extremely brute-force pure numerical calculations.
Have top math professors grade hundreds of thousands of mental arithmetic problems for third-grade elementary school students?
Isn't this making things difficult for it?
"If I need to correct elementary school math problems, I should find an elementary school teacher..." Su Zhou muttered to himself, his gaze unconsciously shifting to the computer case under the table, his eyes growing brighter and brighter.
Graphics card! GPU!
What is a GPU?
If the CPU is a professor, then the GPU is a Spartan army composed of hundreds of elementary school math teachers!
Each elementary school teacher only knows the simplest addition, subtraction, multiplication, and division, but there are just too many teachers!
Take the NVIDIA 8800 GTS graphics card, which is currently a high-end product on the market, as an example. It contains a whopping 128 stream processors!
They can work simultaneously in parallel!
Although in a one-on-one comparison, the computing power of a single stream processor is nowhere near that of a CPU core.
But what if the task now is to "finish these one million addition, subtraction, multiplication, and division problems immediately"?
128 elementary school teachers simultaneously distributed and graded papers side-by-side, operating at full capacity. That brute-force parallel computing speed would absolutely crush a professor working alone, leaving them utterly obliterated!
Large-scale, highly parallel pure numerical computation—isn't that a job tailor-made for GPUs?!
Su Zhou straightened up, her heart suddenly racing.
He realized an important problem.
Graphics cards are not for gaming!
P.S. It's the May Day holiday, so please keep reading and vote with your monthly tickets to give this humble author some motivation! I've read all the comments and will make adjustments accordingly.
You'll Also Like
-
Bleach: Getting Stronger Starting from Teaching at the Spiritual Arts Academy
Chapter 327 2 hours ago -
Under One Person, your rebellious life has reached the heavens?
Chapter 661 2 hours ago -
In this anime crossover, who stole my module?
Chapter 182 2 hours ago -
I, disguised as a white dragon, was supported by the state.
Chapter 173 2 hours ago -
Did the Heroic Spirit I conquered become a reality?
Chapter 181 2 hours ago -
Marvel: Starting with mastering the Dark Book
Chapter 98 2 hours ago -
You, a tyrannical ruler, roam the heavens; you cannot understand my joy.
Chapter 327 2 hours ago -
I'm a platinum-level author, so what if I play professionally?
Chapter 131 2 hours ago -
Jin Yuanyuan's Top-Tier Life
Chapter 118 2 hours ago -
My tribe has been invincible for thirty years of gacha pulls.
Chapter 250 2 hours ago