pycharm导包

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/s1162276945/article/details/88092137

同一工作环境下不同文件之间的导包问题

import sys
# print(sys.path)
BASE_DIR = "../MyLayer/"
sys.path.insert(0, BASE_DIR)
# print(sys.path)
from foldingLayer import FoldingLayer
from localAttention import LAttenLayer
current_path = os.path.dirname(os.path.abspath(__file__))
output_path = os.path.join(current_path, 'bert_small.png')
https://github.com/CyberZHG/keras-bert/blob/master/demo/visualization/vis.py

https://blog.csdn.net/chaootis1/article/details/83178006

猜你喜欢

转载自blog.csdn.net/s1162276945/article/details/88092137
今日推荐