A common cause for this error is that the deep learning framework has not been installed, or the correct Python environment is not activated.
In the ArcGIS Pro settings, go to Python. Firstly check that you have around 280 packages installed. You should see some pytorch modules, including torchvision, listed as shown below.
You can also click the Manage Environments button to see if there are any other Python cloned environments which may have the deep learning packages installed. If so, that environment should be the active one.
If you cannot see the deep learning packages installed, then firstly ensure that the default arcgispro-py3 environment is active (as shown in the screenshot above. Then go to the Esri Deep Learning Frameworks Github site and download and install the Deep Learning Libraries Installer for your version.
Note: These installers will place the deep learning packages in the default arcgispro-py3 environment. If you need to clone environments and use deep learning, then make sure you clone the environment after doing the install.
The deep learning installer for ArcGIS Pro 2.8 has not been released yet, but you can follow the instructions in my answer to the below post to manually install it:
https://community.esri.com/t5/member-introductions/deep-learning/m-p/1067694#M880