def main(): train_set, valid_set, train_labels, valid_labels = get_dataset.main() neural_net = new_neuralnet(train_set) iteracoes_grid = int(sys.argv[1]) iteracoes_train = int(sys.argv[2]) # Treinando batch_size= 256 learning_rate, lamb = grid_search(new_neuralnet, train_set, train_labels, iteracoes_grid) print_acuracia = True neural_net.train_neuralnet(train_set, train_labels, valid_set, valid_labels, lamb, learning_rate,batch_size,iteracoes_train, print_acuracia, 'nn_onehidden') neural_net.save_model("exp3_onehidden.npy")
def main(): train_set, valid_set, train_labels, valid_labels = get_dataset.main() neural_softmax = new_neuralnet(train_set) iteracoes_grid = int(sys.argv[1]) iteracoes_train = int(sys.argv[2]) # Treinando batch_size = 256 learning_rate, lamb = grid_search(new_neuralnet, train_set, train_labels, iteracoes_grid) print_acuracia = True neural_softmax.train_neuralnet(train_set, train_labels, valid_set, valid_labels, lamb, learning_rate, batch_size, iteracoes_train, print_acuracia, 'softmax_regression') neural_softmax.save_model("softmax.npy")
def main(): train_set, valid_set, train_labels, valid_labels = get_dataset.main() X = train_set y = train_labels Xv = valid_set yv = valid_labels iteracoes_grid = int(sys.argv[1]) iteracoes_train = int(sys.argv[2]) batch_size = 256 print_acc = True alpha = 0.02 lamb = 0.001 alpha, lamb = grid_search(OneVsAllClassifier, X, y, iteracoes_grid) #print("Vamos fazer one vs all no toy set!") cl = OneVsAllClassifier(X) cl.train_neuralnet(X, y, Xv, yv, alpha, lamb, batch_size, iteracoes_train, print_acc, 'oneVall')