Yesterday was a great start. I laid out my foundation and now I want to dedicate some time in refactoring and modularizing the code so that it can be reused and easily modified.
- Structuring, Testing, and Maintaining Python Programs (Titus Brown, 2007)
Implemented changes
-
Built 2 new class types: (1)
BasicMLP
to define, train, and get the outputs of a basic multilayer perceptron; and (2)ToyData
to load the Kaggle Digit Recognizer data and write out the prediction in the competition’s submission format. -
Defined the parser as a function (
getargs
) so that it can later be imported and reused. Adding additional arguments to the parser allows me to e.g. specify different number of nodes in the hidden layer, the number of epochs (training cycles), and the learning rate, which would increase the number neural networks from 1 (as of yesterday’s script) to many. -
Added
if __name__ == '__main__':
to allow the import of functions without the running of code at import.
Updated script
Future work
I defined a fully-connected neural network, but my features are spatial related. In the future work, I will modify the code to enable the specification of convolutional neural networks.
- Convolutional Neural Networks (CNNs/ConvNets) (karpathy, 2016)