constructor(tensors, elementShape, elementDtype, maxNumElements = -1){
        this.tensors = tensors;
        this.elementShape = elementShape;
        this.elementDtype = elementDtype;
        if (tensors != null) tensors.forEach((tensor)=>{
            if (elementDtype !== tensor.dtype) throw new Error(`Invalid data types; op elements ${elementDtype}, but list elements ${tensor.dtype}`);
            (0, _tensorUtils.assertShapesMatchAllowUndefinedSize)(elementShape, tensor.shape, "TensorList shape mismatch: ");
            (0, _tfjsCore.keep)(tensor);
        });
        this.idTensor = (0, _tfjsCore.scalar)(0);
        this.maxNumElements = maxNumElements;
        (0, _tfjsCore.keep)(this.idTensor);
    }
@param tensors list of tensors
@param elementShape shape of each tensor, this can be a single number (any
shape is allowed) or partial shape (dim = -1).
@param elementDtype data type of each tensor
@param maxNumElements The maximum allowed size of `tensors`. Defaults to -1
  meaning that the size of `tensors` is unbounded.