allocate
Function
Allocates memory space for the input tensor object to receive input data.
C++ Prototype
bool Allocate(size_t size)
Python Prototype
allocate(size)
Parameters
Parameter |
Mandatory/Optional |
Description |
Value |
|---|---|---|---|
size |
Mandatory |
Memory size |
Valid memory size |
Usage Example
Allocate space for tensor data.
1 | status = infer_tensor.allocate(512) |
Parent topic: InferTensor