def create_network(): # Create the network network = Network() network.learning_rate = 0.1 # Pick 'LabelMax' as a labelling function, which means that when # classifying a data instance, the label given to the instance is the one # for which the value of the output function is the highest network.label_function = 'la_max' # Add units (layers) to the network: # Input unit: no need for activation and update functions network.add_unit( 2 ) # Hidden unit network.add_unit( 3, 'ac_sigmoid', 'up_backpropagation' ) # Output unit network.add_unit( 1, 'ac_sigmoid', 'up_backpropagation' ) return network