Livt packages

Livt.ML

Version 1.6.1

Fixed-size quantized inference, tensor storage, attention, and transformer building blocks for Livt.

Published files (132)

src/activation/ReLU.lvt

namespace Livt.ML.Activation

/**
 * Stateless rectified linear unit for integer activations.
 */
component ReLU
{
	/**
	 * Returns input when it is positive, otherwise returns zero.
	 */
	public fn Apply(input: int) int
	{
		if (input > 0) {
			return input
		}

		return 0
	}
}