Class GraphCell
Defined in File cell.h
Inheritance Relationships
Base Type
public mindspore::Cell< GraphCell >
Class Documentation
-
class GraphCell : public mindspore::Cell<GraphCell>
Public Functions
-
GraphCell() = default
Constructor of GraphCell.
-
~GraphCell() override = default
Destructor of GraphCell.
-
explicit GraphCell(const Graph &graph)
Constructor of GraphCell.
- Parameters
graph – [in] Graph to construct.
-
explicit GraphCell(Graph &&graph)
Constructor of GraphCell.
- Parameters
graph – [in] Graph to construct.
-
explicit GraphCell(const std::shared_ptr<Graph> &graph)
Constructor of GraphCell.
-
void SetContext(const std::shared_ptr<Context> &context)
Set a context.
- Parameters
context – [in] Context to be set.
-
inline const std::shared_ptr<Graph> &GetGraph() const
Get back the graph.
- Returns
Graph of the graphcell.
-
Status Run(const std::vector<MSTensor> &inputs, std::vector<MSTensor> *outputs) override
Run the graphcell.
- Parameters
inputs – [in] Vector of MSTensor as inputs.
outputs – [in] Vector of MSTensor as outputs.
- Returns
Status of the operation.
-
std::vector<MSTensor> GetInputs()
Get the inputs.
- Returns
Inputs.
-
std::vector<MSTensor> GetOutputs()
Get the outputs.
- Returns
Outputs.
-
Status Load(uint32_t device_id)
Load the device.
- Parameters
device_id – [in] Device id to be loaded.
- Returns
Status of the operation.
-
GraphCell() = default