I have just found out that there is no problem in model or cuda but there must be a problem in Dataset or DataLoader because Cifar10  from pytorch runs no problem. But I think that dataset is not a problem because there is a lot of models on GitHub with fruits datasets and it also does not work with dogs vs cats dataset so I think that there is some problem with custom datasets and daloader. Do you have any suggestions please. Thanks for  your help.