constraint_nonneg: Constrains the weights to be non-negative.

constraint_nonnegR Documentation

Constrains the weights to be non-negative.

Description

Constrains the weights to be non-negative.

Usage

constraint_nonneg()

Value

A Constraint instance, a callable that can be passed to layer constructors or used directly by calling it with tensors.

See Also

Other constraints:
Constraint()
constraint_maxnorm()
constraint_minmaxnorm()
constraint_unitnorm()


keras3 documentation built on Feb. 13, 2026, 5:06 p.m.