def generate_bin():
    'Generate bin files.'
    parser = argparse.ArgumentParser()
    parser.add_argument('--data_dir', type=str, default='./data/cora/cora_mr', help='Data dir')
    parser.add_argument('--train_nodes_num', type=int, default=140, help='Nodes numbers for training')
    parser.add_argument('--eval_nodes_num', type=int, default=500, help='Nodes numbers for evaluation')
    parser.add_argument('--test_nodes_num', type=int, default=1000, help='Nodes numbers for test')
    parser.add_argument('--result_path', type=str, default='./preprocess_Result/', help='Result path')
    args = parser.parse_args()
    (feature, biases, _, _, _, _, y_test, test_mask) = load_and_process(args.data_dir, args.train_nodes_num, args.eval_nodes_num, args.test_nodes_num)
    feature_path = os.path.join(args.result_path, '00_data')
    biases_path = os.path.join(args.result_path, '01_data')
    y_test_path = os.path.join(args.result_path, 'y_test.npy')
    test_mask_path = os.path.join(args.result_path, 'test_mask.npy')
    os.makedirs(feature_path)
    os.makedirs(biases_path)
    feature.tofile(os.path.join(feature_path, 'feature.bin'))
    biases.tofile(os.path.join(biases_path, 'biases.bin'))
    np.save(y_test_path, y_test)
    np.save(test_mask_path, test_mask)
Generate bin files.
def generate_bin():
    
    parser = argparse.ArgumentParser()
    parser.add_argument('--data_dir', type=str, default='./data/cora/cora_mr', help='Data dir')
    parser.add_argument('--train_nodes_num', type=int, default=140, help='Nodes numbers for training')
    parser.add_argument('--eval_nodes_num', type=int, default=500, help='Nodes numbers for evaluation')
    parser.add_argument('--test_nodes_num', type=int, default=1000, help='Nodes numbers for test')
    parser.add_argument('--result_path', type=str, default='./preprocess_Result/', help='Result path')
    args = parser.parse_args()
    (feature, biases, _, _, _, _, y_test, test_mask) = load_and_process(args.data_dir, args.train_nodes_num, args.eval_nodes_num, args.test_nodes_num)
    feature_path = os.path.join(args.result_path, '00_data')
    biases_path = os.path.join(args.result_path, '01_data')
    y_test_path = os.path.join(args.result_path, 'y_test.npy')
    test_mask_path = os.path.join(args.result_path, 'test_mask.npy')
    os.makedirs(feature_path)
    os.makedirs(biases_path)
    feature.tofile(os.path.join(feature_path, 'feature.bin'))
    biases.tofile(os.path.join(biases_path, 'biases.bin'))
    np.save(y_test_path, y_test)
    np.save(test_mask_path, test_mask)