in rfcs/20210731-tfjs-named-tensors/gtensor.ts [281:291]
constructor(tensor: tf.Tensor, dimNames: G[]) {
if(tensor.shape.length !== dimNames.length) {
throw new ValueError(
`tensor.shape: ${tensor.shape
} should be the same length as dimNames: ${dimNames}.`);
}
this.tensor = tensor;
this.dimNames = dimNames;
this._resetDim();
}