GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Packages
  • Classes
  • Files
  • C++ API
  • GitHub
  • Class Index
  • Class Hierarchy
  • Class Members
  • Field
  • schema.py

This view

  • Original page
  • New address

GeezerVison is showing caffe2.ai — Caffe2 - Python API: caffe2.python.schema.Field Class Reference

Logo
Caffe2 - Python API
A deep learning, cross platform ML framework
  • Packages
  • Classes
  • Files
  • C++ API
  • Python API
  • GitHub
  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • caffe2
  • python
  • schema
  • Field
Public Member Functions | List of all members
caffe2.python.schema.Field Class Reference
Inheritance diagram for caffe2.python.schema.Field:

Public Member Functions

def __init__ (self, children)
 
def clone_schema (self)
 
def field_names (self)
 
def field_types (self)
 
def field_metadata (self)
 
def field_blobs (self)
 
def all_scalars (self)
 
def has_blobs (self)
 
def clone (self, keep_blobs=True)
 
def slice (self)
 
def __eq__ (self, other)
 
def __repr__ (self)
 

Detailed Description

Represents an abstract field type in a dataset.

Definition at line 97 of file schema.py.

Constructor & Destructor Documentation

def caffe2.python.schema.Field.__init__ (   self,
  children 
)
Derived classes must call this after their initialization.

Definition at line 101 of file schema.py.

Member Function Documentation

def caffe2.python.schema.Field.__eq__ (   self,
  other 
)
Equivalance of two schemas

Definition at line 179 of file schema.py.

def caffe2.python.schema.Field.all_scalars (   self)
Return the list of all Scalar instances in the Field.
The order is the same as for field_names() or field_blobs()

Definition at line 133 of file schema.py.

def caffe2.python.schema.Field.clone (   self,
  keep_blobs = True 
)
Clone this Field along with its children.

Definition at line 142 of file schema.py.

def caffe2.python.schema.Field.field_blobs (   self)
Return the list of blobs with contents for this Field.
Values can either be all numpy.ndarray or BlobReference.
If any of the fields doens't have a blob, throws.

Definition at line 126 of file schema.py.

def caffe2.python.schema.Field.field_metadata (   self)
Return the Metadata for each of the children fields.

Definition at line 122 of file schema.py.

def caffe2.python.schema.Field.field_names (   self)
Return the children field names for this field.

Definition at line 114 of file schema.py.

def caffe2.python.schema.Field.field_types (   self)
Return the numpy.dtype for each of the children fields.

Definition at line 118 of file schema.py.

def caffe2.python.schema.Field.has_blobs (   self)
Return True if every scalar of this field has blobs.

Definition at line 138 of file schema.py.

def caffe2.python.schema.Field.slice (   self)
Returns a slice representing the range of field ids that belong to
this field. This slice can be used to index a list of fields.

E.g.:

>>> s = Struct(
>>>     ('a', Scalar()),
>>>     ('b', Struct(
>>>         ('b1', Scalar()),
>>>         ('b2', Scalar()),
>>>     )),
>>>     ('c', Scalar()),
>>> )
>>> field_data = ['da', 'db1', 'db2', 'dc']
>>> field_data[s.b.split()]
['db1', 'db2']

Definition at line 149 of file schema.py.


The documentation for this class was generated from the following file:
  • caffe2/python/schema.py

Generated on Thu Mar 21 2019 13:06:38 for Caffe2 - Python API by   doxygen 1.8.11

Facebook Open Source

Open Source Projects GitHub Twitter
Contribute to this project on GitHub
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.