MCPcopy Index your code
hub / github.com/lazyprogrammer/machine_learning_examples / fit

Method fit

unsupervised_class2/unsupervised.py:31–42  ·  view source on GitHub ↗
(self, X, pretrain_epochs=1)

Source from the content-addressed store, hash-verified

29 count += 1
30
31 def fit(self, X, pretrain_epochs=1):
32 self.D = X.shape[1] # save for later
33
34 current_input = X
35 for ae in self.hidden_layers:
36 ae.fit(current_input, epochs=pretrain_epochs)
37
38 # create current_input for the next layer
39 current_input = ae.hidden_op(current_input)
40
41 # return it here so we can use directly after fitting without calling forward
42 return current_input
43
44 def forward(self, X):
45 Z = X

Callers 2

mainFunction · 0.95
mainFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected