<commit_before>import time
import logging
import numpy as np

from collections import deque

from robo.models.base_model import BaseModel
from robo.util.normalization import zero_mean_unit_var_normalization, zero_mean_unit_var_unnormalization

try:
    import theano
    import theano.tensor as T
    import lasagne
    from sgmcmc.theano_mcmc import SGLDSampler, SGHMCSampler
    from sgmcmc.utils import floatX
    from sgmcmc.bnn.priors import WeightPrior, LogVariancePrior
    from sgmcmc.bnn.lasagne_layers import AppendLayer
except ImportError as e:
    _has_dependencies = False


def get_default_net(n_inputs):
    l_in = lasagne.layers.InputLayer(shape=(None, n_inputs))

    fc_layer_1 = lasagne.layers.DenseLayer(
        l_in,
        num_units=50,
        W=lasagne.init.HeNormal(),
        b=lasagne.init.Constant(val=0.0),
        nonlinearity=lasagne.nonlinearities.tanh)
    fc_layer_2 = lasagne.layers.DenseLayer(
        fc_layer_1,
        num_units=50,
        W=lasagne.init.HeNormal(),
        b=lasagne.init.Constant(val=0.0),
        nonlinearity=lasagne.nonlinearities.tanh)
    fc_layer_3 = lasagne.layers.DenseLayer(
        fc_layer_2,
        num_units=50,
        W=lasagne.init.HeNormal(),
        b=lasagne.init.Constant(val=0.0),
        nonlinearity=lasagne.nonlinearities.tanh)
    l_out = lasagne.layers.DenseLayer(
        fc_layer_3,
        num_units=1,<commit_msg>adds missing else statement for handling optional dependencies<commit_after>import time
import logging
import numpy as np

from collections import deque

from robo.models.base_model import BaseModel
from robo.util.normalization import (zero_mean_unit_var_normalization,
                                     zero_mean_unit_var_unnormalization)

try:
    import theano
    import theano.tensor as T
    import lasagne
    from sgmcmc.theano_mcmc import SGLDSampler, SGHMCSampler
    from sgmcmc.utils import floatX
    from sgmcmc.bnn.priors import WeightPrior, LogVariancePrior
    from sgmcmc.bnn.lasagne_layers import AppendLayer
except ImportError as e:
    _has_dependencies = False
else:
    _has_dependencies = True


def get_default_net(n_inputs):
    l_in = lasagne.layers.InputLayer(shape=(None, n_inputs))

    fc_layer_1 = lasagne.layers.DenseLayer(
        l_in,
        num_units=50,
        W=lasagne.init.HeNormal(),
        b=lasagne.init.Constant(val=0.0),
        nonlinearity=lasagne.nonlinearities.tanh)
    fc_layer_2 = lasagne.layers.DenseLayer(
        fc_layer_1,
        num_units=50,
        W=lasagne.init.HeNormal(),
        b=lasagne.init.Constant(val=0.0),
        nonlinearity=lasagne.nonlinearities.tanh)
    fc_layer_3 = lasagne.layers.DenseLayer(
        fc_layer_2,
        num_units=50,
        W=lasagne.init.HeNormal(),
        b=lasagne.init.Constant(val=0.0),
        nonlinearity=lasagne.nonlinearities.tanh)
    l_out = lasagne.layers.DenseLayer(
        fc_layer_3,
        num_units=1,
{'fraction_non_alphanumeric': 0.0790998977156495, 'fraction_numerical': 0.012956017729287419, 'mean_word_length': 3.1735419630156474, '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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7615499', 'n_tokens_mistral': 1035, 'n_tokens_neox': 996, 'n_words': 177}