@Override
        protected TensorFunction<Reference> lazyGetFunction() {
            if ( ! allInputFunctionsPresent(1)) return null;
            List<String> reduceDimensions = reduceDimensions();
            TensorFunction<Reference> input = inputs.get(0).function().get();
            TensorFunction<Reference> max = new Reduce<>(input, Reduce.Aggregator.max, reduceDimensions);
            TensorFunction<Reference> cap = new Join<>(input, max, ScalarFunctions.subtract());  // to avoid overflow
            TensorFunction<Reference> exp = new Map<>(cap, ScalarFunctions.exp());
            return exp;
        }
Convert imported 'softmax' operation to the Vespa softmax ranking function.

@author lesters
model-integration/src/main/java/ai/vespa/rankingexpression/importer/operations/Softmax.java