gather(indices, dtype) {
          if (!!dtype && dtype !== this.dtype) {
              throw new Error(`TensorArray dtype is ${this.dtype} but gather requested dtype ${dtype}`);
          }
          if (!indices) {
              indices = [];
              for (let i = 0; i < this.size(); i++) {
                  indices.push(i);
              }
          }
          else {
              indices = indices.slice(0, this.size());
          }
          if (indices.length === 0) {
              return tfc.tensor([], [0].concat(this.elementShape));
          }
          // Read all the PersistentTensors into a vector to keep track of
          // their memory.
          const tensors = this.readMany(indices);
          assertShapesMatchAllowUndefinedSize(this.elementShape, tensors[0].shape, 'TensorArray shape mismatch: ');
          return tfc.stack(tensors, 0);
      }
/**
       * Return selected values in the TensorArray as a packed Tensor. All of
       * selected values must have been written and their shapes must all match.
       * @param [indices] number[] Optional. Taking values in [0, max_value). If the
       *    TensorArray is not dynamic, max_value=size(). If not specified returns
       *    all tensors in the original order.
       * @param [dtype]
       */
Return selected values in the TensorArray as a packed Tensor. All of
selected values must have been written and their shapes must all match.
@param [indices] number[] Optional. Taking values in [0, max_value). If the
TensorArray is not dynamic, max_value=size(). If not specified returns
all tensors in the original order.
@param [dtype]
Return selected values in the TensorArray as a packed Tensor . All of selected values must have been written and their shapes must all match . @param [ indices ] number [] Optional . Taking values in [ 0 max_value ) . If the TensorArray is not dynamic max_value = size () . If not specified returns all tensors in the original order . @param [ dtype ]
gather(indices, dtype) {
          if (!!dtype && dtype !== this.dtype) {
              throw new Error(`TensorArray dtype is ${this.dtype} but gather requested dtype ${dtype}`);
          }
          if (!indices) {
              indices = [];
              for (let i = 0; i < this.size(); i++) {
                  indices.push(i);
              }
          }
          else {
              indices = indices.slice(0, this.size());
          }
          if (indices.length === 0) {
              return tfc.tensor([], [0].concat(this.elementShape));
          }
          const tensors = this.readMany(indices);
          assertShapesMatchAllowUndefinedSize(this.elementShape, tensors[0].shape, 'TensorArray shape mismatch: ');
          return tfc.stack(tensors, 0);
      }
gather ( indices , dtype ) { if ( ! ! dtype && dtype !== this . dtype ) { throw new Error ( ` ${ this . dtype } ${ dtype } ` ) ; } if ( ! indices ) { indices = [ ] ; for ( let i = 0 ; i < this . size ( ) ; i ++ ) { indices . push ( i ) ; } } else { indices = indices . slice ( 0 , this . size ( ) ) ; } if ( indices . length === 0 ) { return tfc . tensor ( [ ] , [ 0 ] . concat ( this . elementShape ) ) ; } const tensors = this . readMany ( indices ) ; assertShapesMatchAllowUndefinedSize ( this . elementShape , tensors [ 0 ] . shape , 'TensorArray shape mismatch: ' ) ; return tfc . stack ( tensors , 0 ) ; }
Return selected values in the TensorArray as a packed Tensor.
Return selected values in the TensorArray as a packed Tensor .
// Read all the PersistentTensors into a vector to keep track of // their memory.