Keraflow
Deep Learning for Python.
 All Classes Namespaces Functions Pages
keraflow.constraints.MaxNorm Class Reference

Constrain the weights along an axis pattern to have unit norm. More...

Inheritance diagram for keraflow.constraints.MaxNorm:

Public Member Functions

def __init__
 

Detailed Description

Constrain the weights along an axis pattern to have unit norm.

Constructor & Destructor Documentation

def keraflow.constraints.MaxNorm.__init__ (   self,
  m = 2,
  axis = 0 
)
Parameters
mfloat. The target max norm.
axisint/list of int, axis pattern along which to calculate weight norms. Examples:
  1. In Dense layer, W has has shape (input_dim, output_dim), set axis to 0 to constrain each row vector of size (input_dim,).
  2. In a Convolution2D, W has shape (input_depth, output_depth, kernel_rows, kernel_cols), set axis to [0,2,3] to constrain the weights of each kernel tensor of size (input_depth, kernel_rows, kernel_cols).