Soft-Max circuit design with adjustable gain