Looking for an operation that converts a vector or tensor into a scalar, when the vector or tensor value is large.
For example, if I multiply a row vector by a column vector, I get a scalar but I really need a function that turns a column vector into a scalar, when its value is significantly large, but if the vectors value is small, the function simply returns another vector.
I would like it to work with tensors as well.
I hope you find it an interesting problem - I am looking for a function, which can be an operation, but not another vector.