今日精选
HOT最新资讯
共 31421 篇Epic Games details how it's embracing generative AI in Unreal Engine
Epic Games is making generative AI a big part of upcoming versions of Unreal Engine.
California says AT&T lied to FCC in attempt to shut off old phone network
FCC considers AT&T petitions to preempt state rules and discontinue phone service.
OpenAI joins The Rust Foundation as a Platinun member and donates funds to support Rust maintenance
submitted by /u/JuanAG [link] [留言]
Massive breach spills credentials for thousands of sensitive networks
The affected include Oracle, Lenovo, FedEx, a NATO contractor, and Fortinet.
FTC lawsuit reveals how subscription scam networks evade app store enforcement
A new FTC lawsuit reveals how sophisticated subscription app operators can allegedly use shell companies and payment infrastructure to stay active on app stores despite mounting consumer complaints.
Getting more from each token: How Copilot improves context handling and model routing
How GitHub Copilot is making more of each session go toward useful work, so your credits go further. The post Getting more from each token: How Copilot improves context handling and model routing appeared first on The GitHub Blog .
AI coding agents taught robots how to install GPUs and cut zip ties
Nvidia's self-improvement program for robots enlists teams of AI coding agents.
The hacker sent by Anthropic to calm the government's nerves about AI safety
Readable: https://www.wsj.com/tech/ai/anthropic-mythos-safety-nicholas...
Epic wants to let you bring your Fortnite skins to other games
Epic Games has been touting the potential of an interoperable metaverse for years, though that vision hasn't yet become a reality. But with Unreal Engine 6, the next major version of its game development engine, Epic plans to take a big step toward that theoretical future: it will let developers make games that can use […]
World leaders want American AI. They just don’t want America to be able to turn it off.
French President Macron and Indian PM Modi raised alarms at the G7 summit that the U.S. could cut off access to American AI overnight — a fear the Anthropic blackout just made real.
Anthropic's design assistant now works better with its coding agent
Anthropic's tools are getting chummy with each other.
Neural Networks with PyTorch and Lightning AI Part 3: Moving Training Logic into Lightning
In the previous series, when we optimized our neural network, we had to write quite a bit of training code ourselves. First, we created an optimizer object that used Stochastic Gradient Descent (SGD) to optimize final_bias . Then we wrote loops to calculate the derivatives required for gradient descent. We trained the model for up to 100 epochs . For each training example, we: Ran the input through the neural network to get a prediction. Calculated the loss. Calculated the derivatives of the loss function. After processing all three training points, we used: optimizer . step () to take a small step toward a better value for final_bias . Then we used: optimizer . zero_grad () to clear the accumulated gradients before starting the next epoch. All of this required a considerable amount of training code. Let's see how Lightning helps simplify this process. Organizing Training Logic with Lightning Previously, we created a class to store the weights, biases, and the forward() function. The optimization-related code was written separately outside the class. With Lightning, we can keep all of this logic in one place. We start by creating the class as usual, and then add a few new methods. Configuring the Optimizer The first method is configure_optimizers() . def configure_optimizers ( self ): return SGD ( self . parameters (), lr = self . learning_rate ) This method tells Lightning how the neural network should be optimized. The learning rate is stored in the self.learning_rate variable that we defined earlier. Defining a Training Step Next, we add a method called training_step() . def training_step ( self , batch , batch_idx ): input_i , label_i = batch output_i = self . forward ( input_i ) loss = ( output_i - label_i ) ** 2 return loss This method receives: A batch of training data from the DataLoader. The index of that batch. Inside the method, we: Extract the input and label from the batch. Run the input through the neural network. Calculate the loss using the squared r