先使用rb
二进制读取读取,文件然后使用decode
进行转码
with open(CHECKPOINT + 'checkpoint.txt', 'rb') as f:
self.step = str(f.read().decode('utf-8'))
先使用rb
二进制读取读取,文件然后使用decode
进行转码
with open(CHECKPOINT + 'checkpoint.txt', 'rb') as f:
self.step = str(f.read().decode('utf-8'))