# Path: sop_embed/extra.py
# def relu(x):
#     return T.switch(x > 0, x, 0)
# 
# Path: sop_embed/extra.py
# class NonLinearity:
#     RELU = "rectifier"
#     TANH = "tanh"
#     SIGMOID = "sigmoid"
# 
# Path: sop_embed/extra.py
# class CostType:
#     MeanSquared = "MeanSquaredCost"
#     CrossEntropy = "CrossEntropy"


import theano
import theano.tensor as T
import numpy as np
import cPickle as pkl
from theano.tensor.shared_randomstreams import RandomStreams
from layer import AEHiddenLayer, AEOutputLayer
from sop_embed.extra import relu
from sop_embed.extra import NonLinearity
from sop_embed.extra import CostType
from collections import OrderedDict
            nhid=None,
            nvis_dec=None,
            nhid_dec=None,
            rnd=None,
            bhid=None,
            cost_type=CostType.MeanSquared,
            momentum=1,
            num_pieces=1,
            L2_reg=-1,
            L1_reg=-1,
            sparse_initialize=False,
            nonlinearity=NonLinearity.TANH,
            bvis=None,
            tied_weights=True,
            reverse=False):

        self.input = input
        self.nvis = nvis
        self.nhid = nhid
        self.bhid = bhid
        self.bvis = bvis
        self.momentum = momentum
        self.nonlinearity = nonlinearity
        self.tied_weights = tied_weights
        self.gparams = None
        self.reverse = reverse
        self.activation = self.get_non_linearity_fn()
        self.catched_params = []

        if cost_type == CostType.MeanSquared:

# Path: sop_embed/extra.py
# def relu(x):
#     return T.switch(x > 0, x, 0)
# 
# Path: sop_embed/extra.py
# class NonLinearity:
#     RELU = "rectifier"
#     TANH = "tanh"
#     SIGMOID = "sigmoid"
# 
# Path: sop_embed/extra.py
# class CostType:
#     MeanSquared = "MeanSquaredCost"
#     CrossEntropy = "CrossEntropy"


# Path: sop_embed/ae.py
import theano
import theano.tensor as T
import numpy as np
import cPickle as pkl
from theano.tensor.shared_randomstreams import RandomStreams
from layer import AEHiddenLayer, AEOutputLayer
from sop_embed.extra import relu
from sop_embed.extra import NonLinearity
from sop_embed.extra import CostType
from collections import OrderedDict

            nhid=None,
            nvis_dec=None,
            nhid_dec=None,
            rnd=None,
            bhid=None,
            cost_type=CostType.MeanSquared,
            momentum=1,
            num_pieces=1,
            L2_reg=-1,
            L1_reg=-1,
            sparse_initialize=False,
            nonlinearity=NonLinearity.TANH,
            bvis=None,
            tied_weights=True,
            reverse=False):

        self.input = input
        self.nvis = nvis
        self.nhid = nhid
        self.bhid = bhid
        self.bvis = bvis
        self.momentum = momentum
        self.nonlinearity = nonlinearity
        self.tied_weights = tied_weights
        self.gparams = None
        self.reverse = reverse
        self.activation = self.get_non_linearity_fn()
        self.catched_params = []

        if cost_type == CostType.MeanSquared:

            self.cost_type = CostType.MeanSquared