Support set min value or max value.

Signed-off-by: Pengfei Han <hanpfei@gmail.com>