Keraflow
Deep Learning for Python.
 All Classes Namespaces Functions Pages
keraflow.layers.base.Kensor Class Reference

Wrapper for a backend tensor. More...

Inheritance diagram for keraflow.layers.base.Kensor:
keraflow.layers.base.Input

Public Member Functions

def __init__
 

Detailed Description

Wrapper for a backend tensor.

A Kensor wraps a backend tensor and record meta data such as the tensor's shape and path from previous kensors to this kensor. A Kensor is genrated when:

  1. An Input layer is instantiated
  2. A kensor is feed to a layer (Layer.__call__).

Constructor & Destructor Documentation

def keraflow.layers.base.Kensor.__init__ (   self,
  layer,
  name,
  shape,
  tensor,
  ancestor_info = {},
  path = [] 
)
Parameters
layerLayer. The layer that outputs the kensor.
namestr. The name of the kensor.
shapetuple. The shape of the tensor.
tensorbackend tensor. The backend tensor of the kensor.
ancestor_infodict. Info of ancestor kensors of the kensor. Used by Model to determine trainable parameters, regularizers, etc... See Layer.__call__, Model.compile
pathlist. The path from ancestors to the kensor. Used by Model to reconstruct the tensor graph. See Layer.__call__, Model.unpack_init_param