Class GraphCell

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.

参数

graph[in] Graph to construct.

explicit GraphCell(Graph &&graph)

Constructor of GraphCell.

参数

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.

参数

context[in] Context to be set.

inline const std::shared_ptr<Graph> &GetGraph() const

Get back the graph.

返回

Graph of the graphcell.

Status Run(const std::vector<MSTensor> &inputs, std::vector<MSTensor> *outputs) override

Run the graphcell.

参数
  • inputs[in] Vector of MSTensor as inputs.

  • outputs[in] Vector of MSTensor as outputs.

返回

Status of the operation.

std::vector<MSTensor> GetInputs()

Get the inputs.

返回

Inputs.

std::vector<MSTensor> GetOutputs()

Get the outputs.

返回

Outputs.

Status Load(uint32_t device_id)

Load the device.

参数

device_id[in] Device id to be loaded.

返回

Status of the operation.