def add_classifier_layer(net, num_outputs):
 net_classifier = Network((net.sizes + [num_outputs]))
 net_classifier.weights[:(-1)] = net.weights
 net_classifier.biases[:(-1)] = net.biases
 return net_classifier

def add_classifier_layer ( net , num_outputs ) : net_classifier = Network ( ( net . sizes + [ num_outputs ] ) ) net_classifier . weights [ : ( - 1 ) ] = net . weights net_classifier . biases [ : ( - 1 ) ] = net . biases return net_classifier
return the network net .