alphazero_gomoku-tensorflow's Issues
trian.py不保存模型的问题
run中:
for i in range(5): verbose = i % 5 == 0
改为:
for j in range(5): verbose = j % 5 == 0
click部分代码简化问题
尽管不涉及错误,也不影响什么,
双重循环看起来还是很不舒服,毕竟0(1)的问题变成了0(n^2)的问题了,做如下修改比较好:
def click1(self, event): #click1 because keyword repetition
size = self.board.width
current_player = self.board.get_current_player()
if current_player == 1:
# for i in range(size):
# for j in range(size):
i=(event.x)//30
j=(event.y)//30
ri=(event.x)%30
rj=(event.y)%30
i=i-1 if ri<15 else i
j=j-1 if rj<15 else j
move = self.board.location_to_move((i, j))
# if move in self.board.availables:
# square_distance = math.pow((event.x - self.chess_board_points[i][j].pixel_x), 2) + math.pow((event.y - self.chess_board_points[i][j].pixel_y), 2)
# if (square_distance <= 200):
self.cv.create_oval(self.chess_board_points[i][j].pixel_x-10, self.chess_board_points[i][j].pixel_y-10, self.chess_board_points[i][j].pixel_x+10, self.chess_board_points[i][j].pixel_y+10, fill='black')
self.board.do_move(move)
loss计算的问题
在 tf_policy_value_net.py 第54行,定义了每个动作的概率是
self.action_probs = tf.nn.softmax(policy_net_out, name="policy_net_proba"),
第90行定义的loss是
cross_entropy = tf.nn.softmax_cross_entropy_with_logits(logits=self.action_probs, labels=self.mcts_probs)。
但tensorflow文档对 tf.nn.softmax_cross_entropy 这个函数有个warning ,是说不要把softmax的输出给这个函数,因为这个函数内部会自己对logits做一遍softmax……所以这里直接用这个loss是不是不太好
另外,请问model文件夹里的模型是从0开始用这份代码训练的,还是已经训练好的theano/pytorch的模型直接转成tensorflow模型得到的?
环境依赖问题
能问下你的版本环境吗?我试过了很多版本的tensorflow都跑不起来
训练时长?
请问你训练了多久,电脑配置以及总共对弈了大概多少局?
关于模型的问题
请问 自己训练生成的模型 应该怎么使用呢,或者是怎么转换呢?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.