Caffe2 - Python API
A deep learning, cross platform ML framework
Public Member Functions | Public Attributes | List of all members
cnn.CNNModelHelper Class Reference
Inheritance diagram for cnn.CNNModelHelper:

Public Member Functions

def __init__ (self, order="NCHW", name=None, use_cudnn=True, cudnn_exhaustive_search=False, ws_nbytes_limit=None, init_params=True, skip_sparse_optim=False, param_model=None)
 
def GetWeights (self, namescope=None)
 
def GetBiases (self, namescope=None)
 
def ImageInput (self, blob_in, blob_out, use_gpu_transform=False, kwargs)
 
def PadImage (self, blob_in, blob_out, kwargs)
 
def ConvNd (self, args, kwargs)
 
def Conv (self, args, kwargs)
 
def ConvTranspose (self, args, kwargs)
 
def GroupConv (self, args, kwargs)
 
def GroupConv_Deprecated (self, args, kwargs)
 
def FC (self, args, kwargs)
 
def PackedFC (self, args, kwargs)
 
def FC_Prune (self, args, kwargs)
 
def FC_Decomp (self, args, kwargs)
 
def FC_Sparse (self, args, kwargs)
 
def Dropout (self, args, kwargs)
 
def LRN (self, args, kwargs)
 
def Softmax (self, args, kwargs)
 
def SpatialBN (self, args, kwargs)
 
def InstanceNorm (self, args, kwargs)
 
def Relu (self, args, kwargs)
 
def PRelu (self, args, kwargs)
 
def Concat (self, args, kwargs)
 
def DepthConcat (self, args, kwargs)
 
def Sum (self, args, kwargs)
 
def Transpose (self, args, kwargs)
 
def Iter (self, args, kwargs)
 
def Accuracy (self, args, kwargs)
 
def MaxPool (self, args, kwargs)
 
def AveragePool (self, args, kwargs)
 
def XavierInit (self)
 
def ConstantInit (self, value)
 
def MSRAInit (self)
 
def ZeroInit (self)
 
def AddWeightDecay (self, weight_decay)
 
def CPU (self)
 
def GPU (self, gpu_id=0)
 

Public Attributes

 order
 
 use_cudnn
 
 cudnn_exhaustive_search
 
 ws_nbytes_limit
 

Detailed Description

A helper model so we can write CNN models more easily, without having to
manually define parameter initializations and operators separately.

Definition at line 13 of file cnn.py.

Member Function Documentation

◆ AddWeightDecay()

def cnn.CNNModelHelper.AddWeightDecay (   self,
  weight_decay 
)
Adds a decay to weights in the model.

This is a form of L2 regularization.

Args:
    weight_decay: strength of the regularization

Definition at line 200 of file cnn.py.

◆ DepthConcat()

def cnn.CNNModelHelper.DepthConcat (   self,
  args,
  kwargs 
)
The old depth concat function - we should move to use concat.

Definition at line 159 of file cnn.py.

◆ ImageInput()

def cnn.CNNModelHelper.ImageInput (   self,
  blob_in,
  blob_out,
  use_gpu_transform = False,
  kwargs 
)
Image Input.

Definition at line 60 of file cnn.py.


The documentation for this class was generated from the following file: