Last active
March 23, 2019 03:56
-
-
Save PENGZhaoqing/720c4379b95d79b149f09720321b31cb to your computer and use it in GitHub Desktop.
Revisions
-
PENGZhaoqing renamed this gist
Mar 23, 2019 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
PENGZhaoqing created this gist
Mar 23, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ def build(self): """ Builds the full Keras model and stores it in self.model. """ mc = self.config.model in_x = x = Input((1, 12, 54)) x = Flatten(name='initial_flatten')(x) x = Dense(1024,activation='relu')(x) res_out = x # for policy out x = Dense(512, activation='relu')(res_out) policy_out = Dense(self.config.n_labels, activation="softmax",name="policy_out")(x) # for value output x = Dense(128, activation='relu')(res_out) value_out = Dense(1,name="value_out")(x) self.model = Model(in_x, [policy_out, value_out], name="chess_model")