MCPcopy Create free account
hub / github.com/lazyprogrammer/machine_learning_examples / forward

Method forward

ann_class2/dropout_tensorflow.py:110–118  ·  view source on GitHub ↗
(self, X)

Source from the content-addressed store, hash-verified

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

Callers 2

fitMethod · 0.95
forward_testMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected