37 : _node(node), _input_name(input_name)
49void SoftmaxGraphUpdate::input(
const SymbolTable *table)
const
52 _node->logits(input_node);
62 if (node.input_size() != 1)
70 assert(context !=
nullptr);
77 auto tf_softmax = graph->nodes()->create<
TFSoftmax>();
78 tf_softmax->
name(node.name());
81 tensor_names->
enroll(output_name, tf_softmax);
83 auto update = std::make_unique<SoftmaxGraphUpdate>(tf_softmax,
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.
bool validate(const tensorflow::NodeDef &) const override
void build(const tensorflow::NodeDef &, GraphBuilderContext *) const override
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.
CircleInput * input_node(loco::Graph *g, const loco::GraphInputIndex &index)
Find a Pull node with a given input index.
FeatureShapeUpdater update(loco::FeatureShape &feature_shape)
bool has_attrs(const tensorflow::NodeDef &node, const std::vector< std::string > &attr_names)
NodeName name(void) const