Hi fyy!
I believe that your network isn’t actually training.



 fyy:

        trainloader = torch.utils.data.DataLoader(dst, batch_size=Batch_size) #,shuffle =True



Note, that because you do not shuffle your dataset, you will run
on the exact same batches in each epoch.


            Rounding_output_c1 = torch.round(output_c1)



Although technically differentiable, the derivative of torch.round()
is zero (almost) everywhere.  So the gradients that flow back to
your model parameters will be zero, and optimizer.step()
won’t actually do anything.


            loss.requires_grad = True



This is a red flag.  Did you just put this in for good luck?  Or did
you observe that loss.grad == False?  If the latter, something
upstream of loss in your processing is breaking / detaching
your computation graph (and would prevent gradients, zero or
not, from flowing back to your model parameters).


and some result like this :
epoch : 0 	 loss: 5.2415571212768555 	 training_acc tensor(0.3103, device='cuda:0') 	 0m 2s
epoch : 0 	 loss: 5.228370666503906 	 training_acc tensor(0.3235, device='cuda:0') 	 0m 2s
epoch : 0 	 loss: 5.224219799041748 	 training_acc tensor(0.3276, device='cuda:0') 	 0m 2s
epoch : 0 	 loss: 5.222436428070068 	 training_acc tensor(0.3294, device='cuda:0') 	 0m 2s
epoch : 0 	 loss: 5.2202887535095215 	 training_acc tensor(0.3316, device='cuda:0') 	 0m 2s
epoch : 1 	 loss: 5.2415571212768555 	 training_acc tensor(0.3103, device='cuda:0') 	 0m 0s
epoch : 1 	 loss: 5.22836971282959 	 training_acc tensor(0.3235, device='cuda:0') 	 0m 0s
epoch : 1 	 loss: 5.224219799041748 	 training_acc tensor(0.3276, device='cuda:0') 	 0m 0s
epoch : 1 	 loss: 5.222436428070068 	 training_acc tensor(0.3294, device='cuda:0') 	 0m 1s
epoch : 1 	 loss: 5.2202887535095215 	 training_acc tensor(0.3316, device='cuda:0') 	 0m 1s
...



I see that the loss ad accuracy repeats itself exactly* from epoch
to epoch.  So it appears that your model is not training.
*)  The second loss in epoch 0 is slightly different than the second
loss in subsequent epochs.  I’ll choose to attribute that to a slightly
different order of operations in the gpu and therefore differing
round-off error.
So my working hypothesis is that your model isn’t changing at all.
You get different results, of course, for different batches within an
epoch, but when you analyze the same batch in a subsequent,
you get the same result.
The only thing that doesn’t fit with this explanation is that your loss
is going down systematically from batch to batch (within an epoch),
and your accuracy is going up.  That makes it look like your model
is training.  But I don’t see anything in your code that would reset
your model from one epoch to the next.  It is hard for me to attribute
the decreasing loss to random luck, although it could be due to
some structure in the (unshuffled) order of samples in your training
set.
Step 1:  Get rid of torch.round() (and any other zero-derivative
functions) leading up to your loss function.
Step 2:  Why are you calling loss.requires_grad = True?
(And why isn’t it throwing an error?  What version of pytorch are
you using?)
Good luck.
K. Frank