Dace:

import torch
import torch.nn as nn
import torch.optim as optim
from torch.utils.data import DataLoader
import torchvision.transforms as transforms
from cifarloader import cifar10
from model import Model


t = transforms.Compose(
		[
			lambda x:torch.Tensor(x),
			lambda x:x/255,
			transforms.Normalize((0.475,0.475,0.475),(0.253,0.253,0.253))

		]
)


cifar10 = cifar10(transforms=t)
dataloader = DataLoader(cifar10,batch_size=20,shuffle=True)
net = Model()


loss_fn = nn.MSELoss()
optim = optim.Adam(net.parameters(),lr=0.003)


epochs = 100

for e in range(epochs):
	tloss = 0
	for b in dataloader:

		x,y = b
		optim.zero_grad()
		p = net(x)
		loss = loss_fn(p,y)
		tloss+=loss*20
		loss.backward()
		optim.step()
	if e%10 == 0:
		print(f'Epoch: {e}, Loss{tloss/20}')
		torch.save(net,f'e-{e}-l-{tloss}.pth')



I think I saw the cause of the problem.
However, I had this problem with your code: No module named cifarloader.
Is it a python module (if so how do I install it) or one of your scripts (if so, I need it)?