hello, I am new to neural network models, I would like to ask if I am training the model correctly?
here is the part of the code
model = AudioDiffusionModel(in_channels=1).to("cuda")
optimizer = Adam(model.parameters(),lr=0.0001)
for i in range(epochs):
for x in iter(Data):
loss = model(x)
loss.backward()
optimizer.step()
optimizer.zero_grad()
loss_history.append(loss)
hello, I am new to neural network models, I would like to ask if I am training the model correctly? here is the part of the code