Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
For introducing 3D ML models into javascript (#8011).
Implementation detail
Added
batchNorm5d
moduleI implemented following sample code of 3d model in keras. After converting this to JS model and importing it from some files, console outputs need for batch normalizain of rank 5. Thus, I added
batchnorm5d.ts
following the implementation of other batch normalization code likebatchnorm4d.ts
.Updated related codes
In
batchnorm.ts
, the input tensor reshaped into buffered tensor of rank 4(x4D
), exceeding rank 5. I modified the code to be able to handle 5-d batch normalization.Added test code of
batchNorm5d
.Also added test code in
batchnorm_test.ts
. This code also heavily follows other test code implementation likebatchnorm4d
.Note
I created this code with
4.x_dev
branch and merged it to local master branch. There must be no conflict.