deephyper.nas.node.MimeNode#

class deephyper.nas.node.MimeNode(node, name='')[source]#

Bases: deephyper.nas.node.OperationNode

A MimeNode is a node which reuse an the choice made for an VariableNode, it enable the definition of a Cell based search_space. This node reuse the operation from the mimed VariableNode but only the choice made.

Parameters

node (VariableNode) – the VariableNode to mime.

>>> from deephyper.nas.space.node import VariableNode, MimeNode
>>> from deephyper.nas.space.op.op1d import Dense
>>> vnode = VariableNode()
>>> vnode.add_op(Dense(10))
>>> vnode.add_op(Dense(20))
>>> mnode = MimeNode(vnode)
>>> mnode.add_op(Dense(30))
>>> mnode.add_op(Dense(40))
>>> vnode.set_op(0)
>>> vnode.op
Dense_10
>>> mnode.op
Dense_30

Methods

add_op

create_tensor

set_op

verify_operation

Attributes

id

num

num_ops

op

ops