Many thanks for your reply. Sorry I am transferring my model and data and labels to the GPU.I am not sure if I should transfer criterion and optimizer to the GPU or not?
I used them in this way
criterion = nn.BCELoss()
optimizer = torch.optim.Adam(model.parameters(), lr=.03)
I appreciate your help
Do u know any books or links which is usable?
S