(self, X)
| 108 | plt.show() |
| 109 | |
| 110 | def forward(self, X): |
| 111 | # tf.nn.dropout scales inputs by 1/p_keep |
| 112 | # therefore, during test time, we don't have to scale anything |
| 113 | Z = X |
| 114 | Z = tf.nn.dropout(Z, self.dropout_rates[0]) |
| 115 | for h, p in zip(self.hidden_layers, self.dropout_rates[1:]): |
| 116 | Z = h.forward(Z) |
| 117 | Z = tf.nn.dropout(Z, p) |
| 118 | return tf.matmul(Z, self.W) + self.b |
| 119 | |
| 120 | def forward_test(self, X): |
| 121 | Z = X |
no outgoing calls
no test coverage detected