thank you for the reply. I tried to install 1.4 version via
conda install pytorch==1.4.0 torchvision==0.5.0 cudatoolkit=10.1 -c pytorch 
The installation was successful, cuda_is_available returns True, but the computation takes forever even for the models for that it worked really fast on 1.7 version. My GPU model is Nvidia A100. nvidia-smi says that 500mb are busy, before it was about 2-3GB for the prediction. Could it be possible that older pytorch versions aren’t compatible with this gpu?