MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Operation

Class Operation

tensorflow/cc/framework/ops.h:37–62  ·  view source on GitHub ↗

Represents a node in the computation graph.

Source from the content-addressed store, hash-verified

35
36/// Represents a node in the computation graph.
37class Operation {
38 public:
39 Operation() : node_(nullptr) {}
40 explicit Operation(Node* n);
41
42 int32 num_inputs() const { return node_->num_inputs(); }
43 DataType input_type(int32 o) const { return node_->input_type(o); }
44 Output input(int32 i) const;
45
46 int32 num_outputs() const { return node_->num_outputs(); }
47 DataType output_type(int32 o) const { return node_->output_type(o); }
48 Output output(int32 i) const;
49
50 Node* node() const { return node_; }
51
52 uint64 hash(int32 index) const;
53
54 bool operator==(const Operation& other) const { return node_ == other.node_; }
55
56 private:
57 typedef std::vector<std::pair<Node*, int32>> Inputs;
58 static Inputs GetInputs(Node* node);
59
60 Inputs inputs_;
61 Node* node_;
62};
63
64/// Represents a tensor value produced by an Operation.
65class Output {

Callers 5

AddGradientsMethod · 0.70
TESTFunction · 0.70
OutputClass · 0.70
InputClass · 0.70
ClearColocationMethod · 0.70

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.56