constructor(name, dtype, maxSize, elementShape, identicalElementShapes, dynamicSize, clearAfterRead){
        this.name = name;
        this.dtype = dtype;
        this.maxSize = maxSize;
        this.elementShape = elementShape;
        this.identicalElementShapes = identicalElementShapes;
        this.dynamicSize = dynamicSize;
        this.clearAfterRead = clearAfterRead;
        this.tensors = [];
        this.closed_ = false;
        this.idTensor = (0, _tfjsCore.scalar)(0);
        (0, _tfjsCore.keep)(this.idTensor);
    }
The TensorArray object keeps an array of Tensors.  It
allows reading from the array and writing to the array.