| Parameter | Input/Output | Description |
|---|---|---|
| key | Input | Unique resource ID. It is specified by the InferShape function of the resource operator. |
| Type | Description |
|---|---|
| ResourceContext * | Resource context object. The basic definition is as follows, based on which the resource operator can be extended. struct ResourceContext {virtual ~ResourceContext() {}}; It is used to store resource information, such as shape and data type. |
This API will return a null pointer if the pointer to the resource context manager is not passed when InferenceContext is created using the Create API. You need to check whether the return is a null pointer before using it.