Well I’m not sure about what’s the return of loss.backward()
It can be None if the method “backward” returns nothing . The requirement is loss is not NaN.
Soo if you are using a custom dataset, how big is it compared to the original one? You may want to reduce the amount of convolutions / filters you are using.
If your loss or any of the inner computations were NaN or Inf, wou values of the weights wo. Would also be NaN. Basically, when a NaN falls in the process it spreads. I think it’s just regular overfitting.
Ofc I’m neither sure about the range of values your loss should be reaching but 10e-3 seems already small. I would bet it reached those values within the first epoch.