deephyper.nas.node.VariableNode#
- class deephyper.nas.node.VariableNode(name='')[source]#
Bases:
OperationNode
This class represents a node of a graph where you have a set of possible operations. It means the agent will have to act to choose one of these operations.
>>> import tensorflow as tf >>> from deephyper.nas.space.node import VariableNode >>> vnode = VariableNode("VNode1") >>> from deephyper.nas.space.op.op1d import Dense >>> vnode.add_op(Dense( ... units=10, ... activation=tf.nn.relu)) >>> vnode.num_ops 1 >>> vnode.add_op(Dense( ... units=1000, ... activation=tf.nn.tanh)) >>> vnode.num_ops 2 >>> vnode.set_op(0) >>> vnode.op.units 10
- Parameters:
name (str) – node name.
Methods
add_op
create_tensor
Denormalize a normalized index to get an absolute indexes.
get_op
set_op
verify_operation
Attributes
id
num
num_ops
op
ops