Open chentao2016 opened 6 years ago
Hi! What helped me was to add
import sys sys.path.insert(0, '/absolute/path/to/your/project/folder')
at the top of the file and then changing the utils import to
from utils.misc import get_upsampling_weight
. You can also add the import sys part to the init.py file. Hope it resolves your issue, too!
Hi! What helped me was to add
import sys sys.path.insert(0, '/absolute/path/to/your/project/folder')
at the top of the file and then changing the utils import to
from utils.misc import get_upsampling_weight
. You can also add the import sys part to the init.py file. Hope it resolves your issue, too!
It work for me, just modify all the files fcn16s.py, fcn32s.py, ... etc
hi,when i try to run the code ,i have the ValueError: Attempted relative import beyond toplevel package.I cannot find the reason. File "../../models/fcn16s.py ", line 5, in
from ..utils import get_upsampling_weight
ValueError: Attempted relative import beyond toplevel package