|
|
|
@ -95,16 +95,21 @@ class OperatorBase {
|
|
|
|
|
|
|
|
|
|
//! Get a input with argument's name described in `op_proto`
|
|
|
|
|
const std::string& Input(const std::string& name) const;
|
|
|
|
|
|
|
|
|
|
//! Get a input which has multiple variables.
|
|
|
|
|
//! TODO add a vector_view to prevent memory copy.
|
|
|
|
|
std::vector<std::string> Inputs(const std::string& name) const;
|
|
|
|
|
|
|
|
|
|
//! Get a output with argument's name described in `op_proto`
|
|
|
|
|
const std::string& Output(const std::string& name) const;
|
|
|
|
|
//! Get an output which has multiple variables.
|
|
|
|
|
//! TODO add a vector_view to prevent memory copy.
|
|
|
|
|
std::vector<std::string> Outputs(const std::string& name) const;
|
|
|
|
|
|
|
|
|
|
const std::string Type() const { return type_; }
|
|
|
|
|
const std::vector<std::string> Inputs() const { return inputs_; }
|
|
|
|
|
const std::vector<std::string> Outputs() const { return outputs_; }
|
|
|
|
|
const AttributeMap& Attrs() const { return attrs_; }
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
std::string type_;
|
|
|
|
|
// NOTE: in case of OpGrad, inputs_ contains:
|
|
|
|
|