Last active
March 23, 2019 03:56
-
-
Save PENGZhaoqing/720c4379b95d79b149f09720321b31cb to your computer and use it in GitHub Desktop.
test
This file contains 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 characters
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") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment