Skip to content

qianyu-berkeley/pytorch_toolbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pytorch_toolbox

The purpose of the repo is the develop a deep learning tool library using pytorch framework and test with some public datasets

Pytorch Training Loop

def fit():
    for epoch in range(epochs):
        for xb,yb in train_dl:         # iterate data from a dataloader (mini-batchs)
            pred = model(xb)           # calculate predictions
            loss = loss_func(pred, yb) # calculate loss
            loss.backward()            # Calculate gradients
            opt.step()                 # Update with the learning rate
            opt.zero_grad()            # Reset gradient (This is different from tensorflow)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published