31 TFRelu6GraphUpdate(
TFRelu6 *node,
const TensorName &&name) : _node(node), _name(name) {}
40void TFRelu6GraphUpdate::input(
const SymbolTable *table)
const
43 _node->features(target);
54 if (node.input_size() != 1)
61 assert(context !=
nullptr);
68 auto relu_node = graph->nodes()->create<
TFRelu6>();
69 relu_node->
name(node.name());
73 tensor_names->
enroll(output_name, relu_node);
76 auto update = std::make_unique<TFRelu6GraphUpdate>(relu_node,
TensorName(node.input(0)));
Logical unit of computation.
Class to store context to build loco graph IR from TensorFlow.
SymbolTable * tensor_names()
Interface to connect the graph.
virtual void input(const SymbolTable *) const =0
Do the graph input connections using the SymbolTable.
void build(const tensorflow::NodeDef &, GraphBuilderContext *) const final
bool validate(const tensorflow::NodeDef &) const final
Class to store and query loco::Node* with string name key.
void enroll(const TensorName &tensor_name, loco::Node *node)
Registers a name with corresponding loco::Node *.
loco::Node * node(const TensorName &tensor_name) const
Queries enrolled(registered) with name and return node if found Will throw runtime_error if not found...
Class to store GraphUpdate objects.
void enroll(std::unique_ptr< GraphUpdate > &&update)
Registers GraphUpdate objects.
FeatureShapeUpdater update(loco::FeatureShape &feature_shape)
Option< std::string > target(optname("--target"), overview("select target language to emit for given architecture." "Valid values are '" NNC_TARGET_ARM_CPP "', '" NNC_TARGET_X86_CPP "', '" NNC_TARGET_ARM_GPU_CPP "', '" NNC_TARGET_INTERPRETER "'"), std::string(), optional(false), optvalues(NNC_TARGET_ARM_CPP "," NNC_TARGET_X86_CPP "," NNC_TARGET_ARM_GPU_CPP "," NNC_TARGET_INTERPRETER), nullptr, separators("="))
NodeName name(void) const