<commit_before>import torch.nn as nn
from torch.autograd import Variable
from torch.nn.modules.loss import _assert_no_grad
import torch
import numpy as np

class PoissonLoss(nn.Module):
    def __init__(self, bias=1e-12):
        super().__init__()
        self.bias = bias

    def forward(self, output, target):
        _assert_no_grad(target)
        return (output - target * torch.log(output + self.bias)).mean()

class PoissonLoss3D(nn.Module):
    def __init__(self, bias=1e-12):
        super().__init__()
        self.bias = bias

    def forward(self, output, target):
        _assert_no_grad(target)
        lag = target.size(1) - output.size(1)
        return (output - target[:,lag:,:] * torch.log(output + self.bias)).mean()

class MSE3D(nn.Module):
    def __init__(self, bias=1e-12):
        super().__init__()
        self.bias = bias

    def forward(self, output, target):
        _assert_no_grad(target)
        lag = target.size(1) - output.size(1)
        return (output - target[:,lag:,:]).pow(2).mean()

class AvgCorr(nn.Module):<commit_msg>MSE3D<commit_after>import torch.nn as nn
from torch.autograd import Variable
from torch.nn.modules.loss import _assert_no_grad
import torch
import numpy as np

class PoissonLoss(nn.Module):
    def __init__(self, bias=1e-12):
        super().__init__()
        self.bias = bias

    def forward(self, output, target):
        _assert_no_grad(target)
        return (output - target * torch.log(output + self.bias)).mean()

class PoissonLoss3D(nn.Module):
    def __init__(self, bias=1e-12):
        super().__init__()
        self.bias = bias

    def forward(self, output, target):
        _assert_no_grad(target)
        lag = target.size(1) - output.size(1)
        return (output - target[:,lag:,:] * torch.log(output + self.bias)).mean()

class MSE3D(nn.Module):
    def __init__(self):
        super().__init__()

    def forward(self, output, target):
        _assert_no_grad(target)
        lag = target.size(1) - output.size(1)
        return (output - target[:,lag:,:]).pow(2).mean()

class AvgCorr(nn.Module):
{'fraction_non_alphanumeric': 0.13860911270983214, 'fraction_numerical': 0.014388489208633094, 'mean_word_length': 2.973333333333333, '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': '5727872', 'n_tokens_mistral': 707, 'n_tokens_neox': 687, 'n_words': 152}