Python* API Reference for Intel® Data Analytics Acceleration Library 2020 Update 1

Public Member Functions | List of all members
BackwardLayers Class Reference

Class that implements functionality of the Collection container. More...

Public Member Functions

def __init__
 
def size
 
def capacity
 
def get
 
def data
 
def push_back
 
def safe_push_back
 
def __lshift__
 
def resize
 
def clear
 
def insert
 
def erase
 
def __getitem__
 
def __setitem__
 

Detailed Description

Parameters
TType of an object stored in the container

Represents a collection of backward stages of neural network layers

Constructor & Destructor Documentation

def __init__ (   self,
  args 
)

Variant 1

Default constructor. Sets the size and capacity to 0.


Variant 2

Constructor. Creates a collection with n empty elements

Parameters
nNumber of elements

Variant 3

Constructor. Creates a collection from the array

Parameters
nNumber of elements
arrayArray with elements

Variant 4

Copy constructor

Parameters
otherCopied collection

Member Function Documentation

def __getitem__ (   self,
  i 
)

read operator []

def __lshift__ (   self,
  x 
)

Adds an element to the end of a collection

Parameters
xElement to add
def __setitem__ (   self,
  i,
  v 
)

write operator []

def capacity (   self)

Size of an allocated storage

Returns
Size of the allocated storage
def clear (   self)

Clears a collection: removes an array, sets the size and capacity to 0

def data (   self,
  args 
)

Variant 1

Returns pointer to the underlying array serving as element storage

Returns
Pointer to the array

Variant 2

Returns const pointer to the underlying array serving as element storage

Returns
Const pointer to the array
def erase (   self,
  pos 
)

Erase an element from a position

Parameters
posPosition to erase
def get (   self,
  args 
)

Variant 1

Element access

Parameters
indexIndex of an accessed element
Returns
Reference to the element

Variant 2

Const element access

Parameters
indexIndex of an accessed element
Returns
Reference to the element
def insert (   self,
  args 
)

Variant 1

Insert an element into a position

Parameters
posPosition to set
xElement to set

Variant 2

Insert a collection to another collection into a position

Parameters
posPosition to see
otherCollection to set
def push_back (   self,
  x 
)

Adds an element to the end of a collection

Parameters
xElement to add
def resize (   self,
  newCapacity 
)

Changes the size of a storage

Parameters
newCapacitySize of a new storage.
def safe_push_back (   self,
  x 
)

Adds an element to the end of a collection

Parameters
xThe element to add
Returns
True if the element was successfully added
def size (   self)

Size of a collection

Returns
Size of the collection

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

For more complete information about compiler optimizations, see our Optimization Notice.