resultFilePath = os.path.split(os.path.realpath(__file__))[0] + '/' + model_name + "_weights/" + dataset_name + "/" + "result" + ".txt"
print(resultFilePath)
if not os.path.exists(resultFilePath):
# with open(resultFilePath,'w'):
# pass
os.mknod(resultFilePath)
获取上一级目录
resultFilePath = os.path.dirname(os.path.split(os.path.realpath(__file__))[0]) + '/' + model_name + "_weights/" + dataset_name + "/" + "result" + ".txt"
print(resultFilePath)
if not os.path.exists(resultFilePath):
# with open(resultFilePath,'w'):
# pass
os.mknod(resultFilePath)
网友评论