deephyper.nas.node.ConstantNode#

class deephyper.nas.node.ConstantNode(op=None, name='', *args, **kwargs)[source]#

Bases: OperationNode

A ConstantNode represents a node with a fixed operation. It means the agent will not make any new decision for this node. The common use case for this node is to add a tensor in the graph.

>>> import tensorflow as tf
>>> from deephyper.nas.space.node import ConstantNode
>>> from deephyper.nas.space.op.op1d import Dense
>>> cnode = ConstantNode(op=Dense(units=100, activation=tf.nn.relu), name='CNode1')
>>> cnode.op
Dense_100_relu
Parameters:
  • op (Operation, optional) – operation to fix for this node. Defaults to None.

  • name (str, optional) – node name. Defaults to ''.

Methods

create_tensor

set_op

verify_operation

Attributes

id

num

op