Belle II Software  release-06-01-15
State Class Reference
Inheritance diagram for State:
Collaboration diagram for State:

Public Member Functions

def __init__ (self, x=None, y=None, activation=None, cost=None, optimizer=None, session=None, **kwargs)
 
def add_to_collection (self)
 
def get_from_collection (self, collection_keys=None)
 

Public Attributes

 x
 feature matrix placeholder
 
 y
 target placeholder
 
 activation
 activation function
 
 cost
 cost function
 
 optimizer
 optimizer used to minimize cost function
 
 session
 tensorflow session
 
 collection_keys
 array to save keys for collection
 

Detailed Description

Tensorflow state

Definition at line 18 of file tensorflow.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  x = None,
  y = None,
  activation = None,
  cost = None,
  optimizer = None,
  session = None,
**  kwargs 
)
 Constructor of the state object 

Definition at line 23 of file tensorflow.py.

23  def __init__(self, x=None, y=None, activation=None, cost=None, optimizer=None, session=None, **kwargs):
24  """ Constructor of the state object """
25 
26  self.x = x
27 
28  self.y = y
29 
30  self.activation = activation
31 
32  self.cost = cost
33 
34  self.optimizer = optimizer
35 
36  self.session = session
37 
38  self.collection_keys = ['x', 'y', 'activation', 'cost', 'optimizer']
39 
40  # other possible things to save into a tensorflow collection
41  for key, value in kwargs.items():
42  self.collection_keys.append(key)
43  setattr(self, key, value)
44 

Member Function Documentation

◆ add_to_collection()

def add_to_collection (   self)
 Add the stored members to the current tensorflow collection 

Definition at line 45 of file tensorflow.py.

◆ get_from_collection()

def get_from_collection (   self,
  collection_keys = None 
)
 Get members from the current tensorflow collection 

Definition at line 58 of file tensorflow.py.


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