<commit_before><commit_msg>Setting up the unet and training the network<commit_after>from scripts.radio_util import DataProvider
from tf_unet import unet
import glob
files = glob.glob('/home/aditi/bgs_example_data/seek_cache/*')
data_provider = DataProvider(600, files)

net = unet.Unet(channels=data_provider.channels, 
                n_class=data_provider.n_class, 
                layers=3, 
                features_root=64,
                cost_kwargs=dict(regularizer=0.001),
                )
trainer = unet.Trainer(net, optimizer="momentum", opt_kwargs=dict(momentum=0.2))
path = trainer.train(data_provider, "./unet_trained_bgs_example_data", 
                     training_iters=32, 
                     epochs=5, 
                     dropout=0.5, 
                     display_step=2)
{'fraction_non_alphanumeric': 0.09398496240601503, 'fraction_numerical': 0.022556390977443608, 'mean_word_length': 2.4145299145299144, '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': '1826544', 'n_tokens_mistral': 255, 'n_tokens_neox': 231, 'n_words': 39}