I tried using pickle to save the tained agent
(我试着用泡菜来保存染色剂)
try:
agent1 = pickle.load(open(model_file_path, 'rb'))
except:
print("An exception occurred")
train_agent(True)
if agent1 == None:
train_agent(True)
human = Human()
human.set_sym(env1.o)
agent1.set_verbose(True)
start_session(agent1, human, Environment(), draw=2)
pickle.dump(agent1, open(model_file_path, 'wb'))
return agent1.prediction
But the file that saves the agent becomes very heavy approx 1gb, hence i am not able to resue the agent
(但是保存代理的文件变得非常沉重,大约1GB,因此我无法恢复代理)
ask by Aparna translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…