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

Public Member Functions

def __init__ (self, cpp_module, attr)
def cpp_dict (self)
def items (self)
def keys (self)
def values (self)
def __iter__ (self)
def __len__ (self)
def __contains__ (self, key)
def __getitem__ (self, key)

Public Attributes


Detailed Description

A wrapper around a C++ OrderedDict that dynamically evaluates the
OrderedDict getter on a bound C++ module, such that new changes on the C++
side are picked up. Otherwise accessing e.g. ``cpp_module._parameters`` just
once would get a frozen copy of the parameters at the time of access.
``torch.nn.Module`` accesses ``_parameters`` et al. via ``self.__dict__`` so
using properties does not work.

Definition at line 6 of file

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