<commit_before>import numpy as np

from collections import OrderedDict
import copy
from six.moves import zip

from keras import backend as K
from keras import activations, initializations, regularizers, constraints
from keras.regularizers import ActivityRegularizer
from keras.layers.core import MaskedLayer


class TimeDistributed(MaskedLayer):
    def __init__(self, layer, input_shape=None, input_dim=None, input_length=None, weights=None, **kwargs):
        if K._BACKEND == 'tensorflow':
            import warnings
            warnings.warn('TimeDistributed() wrapper untested with tensorflow! Use at your own risk.')

        self.layer = layer

        self.initial_weights = weights

        self.input_dim = input_dim
        self.input_length = input_length

        if hasattr(self.layer, 'input_ndim'):
            self.input_ndim = self.layer.input_ndim + 1

        if input_shape:<commit_msg>Update timedistributed.py<commit_after>import numpy as np

from keras import backend as K
from keras import activations, initializations, regularizers, constraints
from keras.regularizers import ActivityRegularizer
from keras.layers.core import MaskedLayer


class TimeDistributed(MaskedLayer):
    def __init__(self, layer, input_shape=None, input_dim=None, input_length=None, weights=None, **kwargs):
        if K._BACKEND == 'tensorflow':
            import warnings
            warnings.warn('TimeDistributed() wrapper untested with tensorflow! Use at your own risk.')

        self.layer = layer

        self.initial_weights = weights

        self.input_dim = input_dim
        self.input_length = input_length

        if hasattr(self.layer, 'input_ndim'):
            self.input_ndim = self.layer.input_ndim + 1

        if input_shape:
{'fraction_non_alphanumeric': 0.07301768397033656, 'fraction_numerical': 0.0011409013120365088, 'mean_word_length': 3.440506329113924, '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': '5540495', 'n_tokens_mistral': 491, 'n_tokens_neox': 476, 'n_words': 142}