Public Member Functions | |
def | __init__ (self, blobs, logging_frequency, p=2, compute_averaged_norm=False) |
def | modify_net (self, net, init_net=None, grad_map=None, blob_to_device=None) |
def | field_name_suffix (self) |
![]() | |
def | __init__ (self) |
def | modify_net (self, net, init_net=None, grad_map=None, blob_to_device=None) |
def | __call__ (self, net, init_net=None, grad_map=None, blob_to_device=None) |
This class modifies the net passed in by adding ops to compute norms for certain blobs. Args: blobs: list of blobs to compute norm for logging_frequency: frequency for printing norms to logs p: type of norm. Currently it supports p=1 or p=2 compute_averaged_norm: norm or averaged_norm (averaged_norm = norm/size)
Definition at line 12 of file compute_norm_for_blobs.py.