# No module named 'model'

I am trying to use the CoAtNet class in the following link CoAtNet Class from Github but I always have error while I am running the following lines:

from torch import nn, sqrt
import torch
import sys
from math import sqrt
#sys.path.append('.')
from model.conv.MBConv import MBConvBlock
from model.attention.SelfAttention import ScaledDotProductAttention


and I get this error:

ModuleNotFoundError: No module named 'model'


from this line:

from model.conv.MBConv import MBConvBlock


can any one helps me Regards in advance !

If you are just using the CoAtNet.py file it gives this error since it is missing relative imports from other folder in the repository (i.e. the MBConvBlock and ScaledDotProductAttention classes). Make sure to either clone the full repository or copy just the two python files (SelfAttention.py and MBConv.py) in which the two classes are defined.