<commit_before>import NeuralNetwork as nn
import PIL.Image

def main():
    test_nn = nn.NeuralNetwork([400, 25, 1])
    test_nn.load_data(create_data(), [1])
    # cost = test_nn.get_cost_train(nn.NeuralNetwork.roll_vec(test_nn.params))
    #test_nn.train()
    test_nn.save_param('/output1.json')
    pass

def create_data():
    test_img = PIL.Image.open('data/raw_data/atty.jpg')
    test_img = test_img.resize((20,20)).convert('L')
    test_list = []
    img_1_feature = []
    for x in range(0,20):
        for y in range(0,20):
            img_1_feature.append(test_img.getpixel((x,y)) / 255)
    test_list.append(img_1_feature)
    return test_list

if __name__ == '__main__':
    main()<commit_msg>fixed image res code<commit_after>import NeuralNetwork as nn
import PIL.Image

def main():
    img_res_side = 70
    test_nn = nn.NeuralNetwork([img_res_side ** 2, 25, 1])
    test_nn.load_data(create_data(), [1])
    # cost = test_nn.get_cost_train(nn.NeuralNetwork.roll_vec(test_nn.params))
    #test_nn.train()
    test_nn.save_param('/output1.json')
    pass

def create_data(img_res_side):
    img_res_side = 25
    test_img = PIL.Image.open('data/raw_data/atty.jpg')
    test_img = test_img.resize((img_res_side,img_res_side)).convert('L')
    test_list = []
    img_1_feature = []
    for x in range(0,img_res_side):
        for y in range(0,img_res_side):
            img_1_feature.append(test_img.getpixel((x,y)) / 255)
    test_list.append(img_1_feature)
    return test_list

if __name__ == '__main__':
    main()
{'fraction_non_alphanumeric': 0.13716525146962769, 'fraction_numerical': 0.027433050293925537, 'mean_word_length': 3.6424242424242426, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7373682', 'n_tokens_mistral': 607, 'n_tokens_neox': 581, 'n_words': 95}