* Returns a three layer sequential model suitable for predicting win state from * feature representation. The input shape depends on whether oneHot * representation is used.
()
| 112 | * representation is used. |
| 113 | */ |
| 114 | function createDNNModel() { |
| 115 | GLOBAL_MODEL = tf.sequential(); |
| 116 | GLOBAL_MODEL.add(tf.layers.dense({ |
| 117 | inputShape: [game.GAME_STATE.max_card_value], |
| 118 | units: 20, |
| 119 | activation: 'relu' |
| 120 | })); |
| 121 | GLOBAL_MODEL.add(tf.layers.dense({units: 20, activation: 'relu'})); |
| 122 | GLOBAL_MODEL.add(tf.layers.dense({units: 1, activation: 'sigmoid'})); |
| 123 | return GLOBAL_MODEL; |
| 124 | } |
| 125 | |
| 126 | |
| 127 | /** |
no outgoing calls
no test coverage detected