PyTorch Flashcards
1
Q
What is the general shape of an image modified by data loader?
A
(N,C,H,W) N: number of data point C: number of colour channel H: height W: weight
2
Q
How are these two function related?
loss. backward()
optimizer. step()
A
When you initialize optimizer you pass in the model parameters. When loss.backward() is called it compute and store the gradient in the model. Both functions point to the model parameters. Also when using loss(outputs, targets) it automatically points to the model.