예제 #1
0
    elif n == 6:
        return 'se (near)'
    elif n == 7:
        return 'se (far)'


# Testing phase
#if (not args.answer):
board_x, board_y, board_z, boards = nl3d.read_probfile(input_problem, n_dims)
#else:
#    board_x, board_y, board_z, boards = nl3d.read_ansfile(input_problem, n_dims)

x_data = [[] for z in range(board_z)]
names = [[] for z in range(board_z)]
for z in range(board_z):
    x_data[z], names[z] = nl3d.gen_dataset_dd(board_x, board_y, board_z, boards, z, n_dims, method, testmode=True)

x_test = [[] for z in range(board_z)]
for z in range(board_z):
    x_test[z] = np.array(x_data[z], dtype=np.float32)

nn = nnmodel.Model1(model)

result = [[] for z in range(board_z)]
for z in range(board_z):
    result[z] = nn.evaluate(x_test[z])

b = board.Board(boards, n_dims)

via_candidates = []