Package dimer :: Package nnet :: Class Model
[hide private]
[frames] | no frames]

Class Model

source code

object --+
         |
        Model
Known Subclasses:

generic model class with basic functionality

Nested Classes [hide private]
  __metaclass__
Metaclass for defining Abstract Base Classes (ABCs).
Instance Methods [hide private]
 
__delitem__(self, i) source code
 
__getitem__(self, i) source code
 
__init__(self, layers)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__len__(self) source code
 
__setitem__(self, i, it) source code
 
__str__(self)
str(x)
source code
 
get_params(self)
(theano) symbolic variables for the weights
source code
 
get_weights(self)
numpy arrays for the weights
source code
 
load(self, path) source code
 
save(self, path) source code
 
set_weights(self, wlst) source code
 
weight_norm(self, degree)
compute the L1 or L2 norm of weights
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  __abstractmethods__ = frozenset([])
  _abc_cache = <_weakrefset.WeakSet object at 0x10dded590>
  _abc_negative_cache = <_weakrefset.WeakSet object at 0x10dded610>
  _abc_negative_cache_version = 23
  _abc_registry = <_weakrefset.WeakSet object at 0x10dded4d0>
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, layers)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

get_params(self)

source code 

(theano) symbolic variables for the weights

Returns:
the list of parameters of layers

get_weights(self)

source code 

numpy arrays for the weights

Returns:
the list of parameters of layers

weight_norm(self, degree)

source code 

compute the L1 or L2 norm of weights

Parameters:
  • degree - keyword `l1` or `l2`
Returns:
the L1 or L2 norm of weights (float)