tfjs
tfjs copied to clipboard
Fix gatherND for 5D inputs
WebGL backend is supposed to support 5D or 6D inputs for gatherND op.
issue
However, WebGL backend throws an error for such inputs because of the following codes in gatherND. Take an input tensor with (1,48,48,17,2) shape for example:
ivec5 paramsShape = ivec5(1,48,48,17,2);
...
paramsShape[j];
reason
This is problematic because ivec5 is a strcuture defined by us, which could be accessed through [] and could be accessed only through .x/.y/.z/.w/.u.
fix
This PR fixes this problem by applying paramsShape's value directly into the code, instead of using an intermediate ivec5.
To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.