<commit_before>import gaussian
import torch, random, sys
from torch.autograd import Variable
from torch.nn import Parameter
from torch.nn.functional import sigmoid
from torch import nn, optim
from tqdm import trange
from tensorboardX import SummaryWriter

import matplotlib.pyplot as plt
import util, logging, time, gc
import numpy as np

from scipy.stats import sem

from argparse import ArgumentParser

import os
logging.basicConfig(filename='run.log',level=logging.INFO)
LOG = logging.getLogger()

"""
Simple experiment: learn the identity function from one tensor to another
"""
w = SummaryWriter()

def go(iterations=30000, batch=4, cuda=False, plot_every=1000,
       lr=0.01, fv=False, sigma_scale=0.1, min_sigma=0.0, seed=0, reps=3, dot_every=100):

    sizes = [4, 8, 16, 32, 64, 128, 256, 512, 1024]
    # sizes = [8, 16]

    MARGIN = 0.1

    torch.manual_seed(seed)

    ndots = iterations // dot_every

    results = np.zeros((len(sizes), reps, ndots))

    if os.path.exists('results.np'):
        results = np.load('results.np')
    else:
        for si, size in enumerate(sizes):<commit_msg>ID experiment<commit_after>import gaussian
import torch, random, sys
from torch.autograd import Variable
from torch.nn import Parameter
from torch.nn.functional import sigmoid
from torch import nn, optim
from tqdm import trange
from tensorboardX import SummaryWriter

import matplotlib.pyplot as plt
import util, logging, time, gc
import numpy as np

from scipy.stats import sem

from argparse import ArgumentParser

import os
logging.basicConfig(filename='run.log',level=logging.INFO)
LOG = logging.getLogger()

"""
Simple experiment: learn the identity function from one tensor to another
"""
w = SummaryWriter()

def go(iterations=30000, batch=4, cuda=False, plot_every=1000,
       lr=0.01, fv=False, sigma_scale=0.1, min_sigma=0.0, seed=0, reps=10, dot_every=100):

    sizes = [4, 8, 16, 32, 64, 128, 256, 512, 1024]
    # sizes = [8, 16]

    MARGIN = 0.1

    torch.manual_seed(seed)

    ndots = iterations // dot_every

    results = np.zeros((len(sizes), reps, ndots))

    if os.path.exists('results.np'):
        results = np.load('results.np')
    else:
        for si, size in enumerate(sizes):
{'fraction_non_alphanumeric': 0.10825439783491204, 'fraction_numerical': 0.043752819124943616, 'mean_word_length': 4.110599078341014, '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': '4696659', 'n_tokens_mistral': 811, 'n_tokens_neox': 719, 'n_words': 230}