<commit_before>import numpy as np
import theano
import theano.tensor as T
from dropout import *
from inits import *

def initialize_weights(n_in, n_out, bias=True, init="normal", scale=0.01):
    if init == "normal":
        init_func = normal
    elif init == "uniform":
        init_func = uniform
    elif init == "orthogonal":
        init_func = orthogonal
    else:
        raise ValueError("Unknown weight initialization function")

    W = init_func(n_in, n_out, name='W', scale=scale)

    if bias:
        b = zeros(n_out, name='b')
        return W, b
    else:
        return W

class InputLayer(object):
	def __init__(self, input, srng, dropout_rate=0.5):
		self.output = input
		self.d_output = dropout(input, dropout_rate)
		self.params = None

class BidirectionalInputLayer(object):
	def __init__(self, input, srng, dropout_rate=0.5):
		self.f_output = input
		self.f_d_output = dropout(input, dropout_rate)
		self.b_output = input
		self.b_d_output = dropout(input, dropout_rate)
		self.params = None
<commit_msg>dropout bugfix<commit_after>import numpy as np
import theano
import theano.tensor as T
from dropout import *
from inits import *

def initialize_weights(n_in, n_out, bias=True, init="normal", scale=0.01):
    if init == "normal":
        init_func = normal
    elif init == "uniform":
        init_func = uniform
    elif init == "orthogonal":
        init_func = orthogonal
    else:
        raise ValueError("Unknown weight initialization function")

    W = init_func(n_in, n_out, name='W', scale=scale)

    if bias:
        b = zeros(n_out, name='b')
        return W, b
    else:
        return W

class InputLayer(object):
	def __init__(self, input, dropout_rate=0.5):
		self.output = input
		self.d_output = dropout(input, dropout_rate)
		self.params = None

class BidirectionalInputLayer(object):
	def __init__(self, input, dropout_rate=0.5):
		self.f_output = input
		self.f_d_output = dropout(input, dropout_rate)
		self.b_output = input
		self.b_d_output = dropout(input, dropout_rate)
		self.params = None

{'fraction_non_alphanumeric': 0.1054172767203514, 'fraction_numerical': 0.006832601268911664, 'mean_word_length': 3.475982532751092, 'pattern_counts': {'":': 6, '<': 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': '4290396', 'n_tokens_mistral': 718, 'n_tokens_neox': 685, 'n_words': 183}