setWeights(weightsArr) {
    super.setWeights(weightsArr)

    const shape_W = this.weights['kernel'].tensor.shape
    this.weights['W_z'] = new Tensor([], [shape_W[0], this.units])
    this.weights['W_r'] = new Tensor([], [shape_W[0], this.units])
    this.weights['W_h'] = new Tensor([], [shape_W[0], this.units])
    ops.assign(this.weights['W_z'].tensor, this.weights['kernel'].tensor.hi(shape_W[0], this.units).lo(0, 0))
    ops.assign(
      this.weights['W_r'].tensor,
      this.weights['kernel'].tensor.hi(shape_W[0], 2 * this.units).lo(0, this.units)
    )
    ops.assign(
      this.weights['W_h'].tensor,
      this.weights['kernel'].tensor.hi(shape_W[0], 3 * this.units).lo(0, 2 * this.units)
    )

    const shape_U = this.weights['recurrent_kernel'].tensor.shape
    this.weights['U_z'] = new Tensor([], [shape_U[0], this.units])
    this.weights['U_r'] = new Tensor([], [shape_U[0], this.units])
    this.weights['U_h'] = new Tensor([], [shape_U[0], this.units])
    ops.assign(this.weights['U_z'].tensor, this.weights['recurrent_kernel'].tensor.hi(shape_U[0], this.units).lo(0, 0))
    ops.assign(
      this.weights['U_r'].tensor,
      this.weights['recurrent_kernel'].tensor.hi(shape_U[0], 2 * this.units).lo(0, this.units)
    )
    ops.assign(
      this.weights['U_h'].tensor,
      this.weights['recurrent_kernel'].tensor.hi(shape_U[0], 3 * this.units).lo(0, 2 * this.units)
    )

    this.weights['b_z'] = new Tensor([], [this.units])
    this.weights['b_r'] = new Tensor([], [this.units])
    this.weights['b_h'] = new Tensor([], [this.units])
    if (this.use_bias) {
      ops.assign(this.weights['b_z'].tensor, this.weights['bias'].tensor.hi(this.units).lo(0))
      ops.assign(this.weights['b_r'].tensor, this.weights['bias'].tensor.hi(2 * this.units).lo(this.units))
      ops.assign(this.weights['b_h'].tensor, this.weights['bias'].tensor.hi(3 * this.units).lo(2 * this.units))
    }

    if (this.gpu) {
      const names = ['W_z', 'W_r', 'W_h', 'U_z', 'U_r', 'U_h', 'b_z', 'b_r', 'b_h']
      names.forEach(name => {
        this.weights[name].createGLTexture({ type: '2d', format: 'float' })
      })
    }
  }
Method for setting layer weights. Extends `super` method.

W weight tensor is split into W_z, W_r, W_h

U weight tensor is split into U_z, U_r, U_h

b weight tensor is split into b_z, b_r, b_h (or create empty bias if this.use_bias is false)

@param {Tensor[]} weightsArr - array of weights which are instances of Tensor