set_max_output_len

Function

Sets the maximum output length.

C++ Prototype

 Status SetMaxOutputLen(uint32_t maxOutputLen)

Python Prototype

set_max_output_len(max_output_len)

Parameters

Parameter

Mandatory/Optional

Description

Value

max_output_len

Mandatory

Maximum output length

The value must be an int type that is within the uint32_t range in C++.

Usage Example

Set the maximum output length for a request.

1
2
max_output_len = 512
status = infer_request.set_max_output_len(max_output_len)