How to use the modelbase.ModelBase.__init__ function in modelbase

To help you get started, we’ve selected a few modelbase examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github uoguelph-mlrg / Theano-MPI / lib / base / models / vggnet_11_shallow.py View on Github external
def __init__(self,config): 
        ModelBase.__init__(self)  

        self.config = config
        self.verbose = self.config['verbose']
        self.build_model()
github CalvinNeo / EasyMLPlatform / py / ml_models / logistic.py View on Github external
def __init__(self, dataset, classfeatureindex = -1, alpha = 0.2, maxiter = 50, *args, **kwargs):
        ModelBase.__init__(self, dataset, 'LOGISTIC', *args, **kwargs)
        self.classfeatureindex = classfeatureindex #index of the column which defines the feature in dataset
        self.Test = self.Classify2
        self.Apply = self.ClassifyDataset
        self.Train = self.Regress
        self.Save = self.DumpLogistic
        self.Load = self.LoadLogistic
        self.Graph = self.ShowImage
        self.Positive = 1
        self.Negative = -1
        # use default
        # self.T = self.RealValue
        self.tree = {}

        self.sigmoid = lambda input_n:np.vectorize(lambda n: 1.0/(1.0+math.e**(-n)))(input_n)
        self.alpha = alpha
        self.maxiter = maxiter
github uoguelph-mlrg / Theano-MPI / lib / models / alex_net.py View on Github external
def __init__(self, config):
        ModelBase.__init__(self)

        self.config = config
        self.verbose = self.config['verbose']
        self.name = 'alexnet'
        batch_size = config['batch_size']
        flag_datalayer = config['use_data_layer']
        lib_conv = config['lib_conv']
        n_softmax_out=config['n_softmax_out']
        # ##################### BUILD NETWORK ##########################
        # allocate symbolic variables for the data
        # 'rand' is a random array used for random cropping/mirroring of data
        x = T.ftensor4('x')
        y = T.lvector('y')
        rand = T.fvector('rand')
        lr = T.scalar('lr')
github uoguelph-mlrg / Theano-MPI / lib / models / lasagne_model_zoo / vgg.py View on Github external
def __init__(self,config): 
        ModelBase.__init__(self)
        
        self.config = config
        self.verbose = config['verbose']
        
        self.name = 'vggnet'
        
        # input shape in c01b 
        self.channels = 3 # 'c' mean(R,G,B) = (103.939, 116.779, 123.68)
        self.input_width = self.config['input_width'] # '0' single scale training 224
        self.input_height = self.config['input_height'] # '1' single scale training 224
        self.batch_size = self.config['batch_size'] # 'b'
        
        # output dimension
        self.n_softmax_out = self.config['n_softmax_out']
github uoguelph-mlrg / Theano-MPI / lib / models / vggnet_16.py View on Github external
def __init__(self,config): 
        ModelBase.__init__(self)  

        self.config = config
        self.verbose = self.config['verbose']
        self.build_model()
        # count params
        if self.verbose: self.count_params()
github uoguelph-mlrg / Theano-MPI / lib / models / cifar10.py View on Github external
def __init__(self,config): 
        ModelBase.__init__(self)  

        self.config = config
        self.verbose = self.config['verbose']
        
        self.name = 'cnncifar10'
        
        # input shape in c01b 
        from data.cifar10 import Cifar10_data
        
        data = Cifar10_data(config)
        
        self.channels = data.channels # 'c' mean(R,G,B) = (103.939, 116.779, 123.68)
        self.input_width = data.input_width # '0' single scale training 224
        self.input_height = data.input_height # '1' single scale training 224
        self.batch_size = data.batch_size # 'b'
github uoguelph-mlrg / Theano-MPI / lib / models / googlenet.py View on Github external
def __init__(self,config):
        ModelBase.__init__(self)
        
        self.verbose = config['verbose']   
        self.config = config
        if self.verbose: print 'GoogLeNet 7/5'
        
        batch_size = config['batch_size']
        input_width = config['input_width']
        input_height = config['input_height']
        n_softmax_out=config['n_softmax_out']
        
        
        self.name = 'googlenet'
        self.batch_size = batch_size
        self.input_width = input_width
        self.input_height = input_height
        self.n_softmax_out = n_softmax_out

modelbase

A package to build metabolic models

MIT
Latest version published 3 days ago

Package Health Score

87 / 100
Full package analysis

Similar packages