junxiaosong / AlphaZero_Gomoku

An implementation of the AlphaZero algorithm for Gomoku (also called Gobang or Five in a Row)
MIT License
3.34k stars 970 forks source link

Keras训练出来的模型无法加载 #96

Open LLYYKK opened 4 years ago

LLYYKK commented 4 years ago

你好,我用Keras跑了你的代码之后,也生成了模型。但是在human.py那加载(也是用Keras版的策略价值网络),会报错。 错误为: net_params = pickle.load(open(model_file, 'rb')) TypeError: expected str, bytes or os.PathLike object, not list

看起来似乎是模型的格式不对,请问这个问题该如何解决呢?

LLYYKK commented 4 years ago

human.py中修改 best_policy = PolicyValueNet(width, height, model_file)