Hi Thanks for your answer !
I updated my Pytorch version, and I show you the python -m torch.utils.collect_env  output :
Collecting environment information...
PyTorch version: 1.9.0+cu102
Is debug build: False
CUDA used to build PyTorch: 10.2
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.2 LTS (x86_64)
GCC version: (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Clang version: Could not collect
CMake version: Could not collect
Libc version: glibc-2.31

Python version: 3.8 (64-bit runtime)
Python platform: Linux-5.8.0-53-generic-x86_64-with-glibc2.10
Is CUDA available: True
CUDA runtime version: Could not collect
GPU models and configuration: GPU 0: GeForce RTX 3060 Laptop GPU
Nvidia driver version: 460.73.01
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] numpy==1.20.2
[pip3] numpydoc==1.1.0
[pip3] torch==1.9.0
[pip3] torchaudio==0.8.0a0+e4e171a
[pip3] torchvision==0.9.1
[conda] blas                      1.0                         mkl  
[conda] cudatoolkit               11.1.74              h6bb024c_0    nvidia
[conda] mkl                       2021.2.0           h06a4308_296  
[conda] mkl-service               2.4.0            py38h497a2fe_0    conda-forge
[conda] mkl_fft                   1.3.0            py38h42c9631_2  
[conda] mkl_random                1.2.2            py38h1abd341_0    conda-forge
[conda] numpy                     1.18.5                   pypi_0    pypi
[conda] numpy-base                1.20.2           py38hfae3a4d_0  
[conda] numpydoc                  1.1.0                      py_1    conda-forge
[conda] torch                     1.9.0                    pypi_0    pypi
[conda] torchaudio                0.8.1                      py38    pytorch
[conda] torchvision               0.9.1                py38_cu111    pytorch


And I still have an issue when I run imgs as previously, but the error changed, I got:
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
~/anaconda3/lib/python3.8/site-packages/IPython/core/formatters.py in __call__(self, obj)
    700                 type_pprinters=self.type_printers,
    701                 deferred_pprinters=self.deferred_printers)
--> 702             printer.pretty(obj)
    703             printer.flush()
    704             return stream.getvalue()

~/anaconda3/lib/python3.8/site-packages/IPython/lib/pretty.py in pretty(self, obj)
    375                 if cls in self.type_pprinters:
    376                     # printer registered in self.type_pprinters
--> 377                     return self.type_pprinters[cls](obj, self, cycle)
    378                 else:
    379                     # deferred printer

~/anaconda3/lib/python3.8/site-packages/IPython/lib/pretty.py in inner(obj, p, cycle)
    553                 p.text(',')
    554                 p.breakable()
--> 555             p.pretty(x)
    556         if len(obj) == 1 and type(obj) is tuple:
    557             # Special case for 1-item tuples.

~/anaconda3/lib/python3.8/site-packages/IPython/lib/pretty.py in pretty(self, obj)
    392                         if cls is not object \
    393                                 and callable(cls.__dict__.get('__repr__')):
--> 394                             return _repr_pprint(obj, self, cycle)
    395 
    396             return _default_pprint(obj, self, cycle)

~/anaconda3/lib/python3.8/site-packages/IPython/lib/pretty.py in _repr_pprint(obj, p, cycle)
    698     """A pprint that just redirects to the normal repr function."""
    699     # Find newlines and replace them with p.break_()
--> 700     output = repr(obj)
    701     lines = output.splitlines()
    702     with p.group():

~/anaconda3/lib/python3.8/site-packages/torch/_tensor.py in __repr__(self)
    201             return handle_torch_function(Tensor.__repr__, (self,), self)
    202         # All strings are unicode in Python 3.
--> 203         return torch._tensor_str._str(self)
    204 
    205     def backward(self, gradient=None, retain_graph=None, create_graph=False, inputs=None):

~/anaconda3/lib/python3.8/site-packages/torch/_tensor_str.py in _str(self)
    404 def _str(self):
    405     with torch.no_grad():
--> 406         return _str_intern(self)

~/anaconda3/lib/python3.8/site-packages/torch/_tensor_str.py in _str_intern(inp)
    379                     tensor_str = _tensor_str(self.to_dense(), indent)
    380                 else:
--> 381                     tensor_str = _tensor_str(self, indent)
    382 
    383     if self.layout != torch.strided:

~/anaconda3/lib/python3.8/site-packages/torch/_tensor_str.py in _tensor_str(self, indent)
    240         return _tensor_str_with_formatter(self, indent, summarize, real_formatter, imag_formatter)
    241     else:
--> 242         formatter = _Formatter(get_summarized_data(self) if summarize else self)
    243         return _tensor_str_with_formatter(self, indent, summarize, formatter)
    244 

~/anaconda3/lib/python3.8/site-packages/torch/_tensor_str.py in get_summarized_data(self)
    274         return torch.stack([get_summarized_data(x) for x in (start + end)])
    275     else:
--> 276         return torch.stack([get_summarized_data(x) for x in self])
    277 
    278 def _str_intern(inp):

~/anaconda3/lib/python3.8/site-packages/torch/_tensor_str.py in <listcomp>(.0)
    274         return torch.stack([get_summarized_data(x) for x in (start + end)])
    275     else:
--> 276         return torch.stack([get_summarized_data(x) for x in self])
    277 
    278 def _str_intern(inp):

~/anaconda3/lib/python3.8/site-packages/torch/_tensor_str.py in get_summarized_data(self)
    272         end = ([self[i]
    273                for i in range(len(self) - PRINT_OPTS.edgeitems, len(self))])
--> 274         return torch.stack([get_summarized_data(x) for x in (start + end)])
    275     else:
    276         return torch.stack([get_summarized_data(x) for x in self])

~/anaconda3/lib/python3.8/site-packages/torch/_tensor_str.py in <listcomp>(.0)
    272         end = ([self[i]
    273                for i in range(len(self) - PRINT_OPTS.edgeitems, len(self))])
--> 274         return torch.stack([get_summarized_data(x) for x in (start + end)])
    275     else:
    276         return torch.stack([get_summarized_data(x) for x in self])

~/anaconda3/lib/python3.8/site-packages/torch/_tensor_str.py in get_summarized_data(self)
    265     if dim == 1:
    266         if self.size(0) > 2 * PRINT_OPTS.edgeitems:
--> 267             return torch.cat((self[:PRINT_OPTS.edgeitems], self[-PRINT_OPTS.edgeitems:]))
    268         else:
    269             return self

RuntimeError: CUDA error: no kernel image is available for execution on the device
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

And I already runned  CUDA_LAUNCH_BLOCKING=1, but it doesn’t change nothing.
Thank you very much for your help !