join() argument must be str or bytes, not ‘type‘

今天跑程序,发现这个报错,

name =our_model
######修改后######
name= 'our_model'

save_filename = 'net_%s.pth'% epoch_label
save_path = os.path.join('./model',name,save_filename)

错误原因:name 那点应该是个字符串,不然报错,修改后就好了

你可能感兴趣的:(join() argument must be str or bytes, not ‘type‘)