Caffe2 - Python API
A deep learning, cross platform ML framework
Public Member Functions | List of all members
caffe2.python.task.Node Class Reference
Inheritance diagram for caffe2.python.task.Node:

Public Member Functions

def __init__ (self, node='local', kwargs)
 
def __str__ (self)
 
def __repr__ (self)
 
def kwargs (self)
 

Detailed Description

A Node context is used to indicate that all Tasks instantiated within will
run on the given node name. (Only the name of the node actually counts.)
Example:

    with TaskGroup() as tg:
        with Node('node1'):
            s1 = execution_step(...)
            Task(step=s1)
        with Node('node2'):
            s2 = execution_step(...)
        with Node('node1'):
            s3 = execution_step(...)

    In this example, all three execution steps will run in parallel.
    Moreover, s1 and s3 will run on the same node, and can see each
    others blobs.

    Additionally, a Node can be passed implementation-specific kwargs,
    in order to specify properties of the node.

Definition at line 61 of file task.py.


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