Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[api] Adds NDArray normalize() operator #1924

Merged
merged 1 commit into from Aug 17, 2022

Conversation

frankfliu
Copy link
Contributor

Change-Id: I877cd924ecada008a53b852092dc224fa1cfa70b

Description

Brief description of what this PR is about

  • If this change is a backward incompatible change, why must this change be made?
  • Interesting edge cases to note here

Change-Id: I877cd924ecada008a53b852092dc224fa1cfa70b
@frankfliu frankfliu requested a review from zachgk as a code owner August 17, 2022 21:18
JNIEnv* env, jobject jthis, jlong jinput, jdouble jp, jlong jdim, jdouble jeps) {
API_BEGIN()
#if defined(__ANDROID__)
env->ThrowNew(ENGINE_EXCEPTION_CLASS, "Normalize is not supported on Android.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

android doesn't support this op?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually didn't try, android doesn't support LayerNorm, and they are defined in the same file, I assume this is not supported. Will try when upgrading android to 1.12.1.

@codecov-commenter
Copy link

Codecov Report

Merging #1924 (266d0df) into master (bb5073f) will decrease coverage by 2.31%.
The diff coverage is 67.05%.

@@             Coverage Diff              @@
##             master    #1924      +/-   ##
============================================
- Coverage     72.08%   69.76%   -2.32%     
- Complexity     5126     5683     +557     
============================================
  Files           473      543      +70     
  Lines         21970    25081    +3111     
  Branches       2351     2713     +362     
============================================
+ Hits          15838    17499    +1661     
- Misses         4925     6250    +1325     
- Partials       1207     1332     +125     
Impacted Files Coverage Δ
api/src/main/java/ai/djl/modality/cv/Image.java 69.23% <ø> (-4.11%) ⬇️
...rc/main/java/ai/djl/modality/cv/MultiBoxPrior.java 76.00% <ø> (ø)
...rc/main/java/ai/djl/modality/cv/output/Joints.java 71.42% <ø> (ø)
.../main/java/ai/djl/modality/cv/output/Landmark.java 100.00% <ø> (ø)
...main/java/ai/djl/modality/cv/output/Rectangle.java 72.41% <0.00%> (ø)
...i/djl/modality/cv/translator/BigGANTranslator.java 21.42% <0.00%> (-5.24%) ⬇️
...odality/cv/translator/BigGANTranslatorFactory.java 33.33% <0.00%> (+8.33%) ⬆️
...nslator/InstanceSegmentationTranslatorFactory.java 14.28% <0.00%> (-3.90%) ⬇️
.../cv/translator/SemanticSegmentationTranslator.java 0.00% <0.00%> (ø)
.../cv/translator/StyleTransferTranslatorFactory.java 40.00% <ø> (ø)
... and 443 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@frankfliu frankfliu merged commit 63c0291 into deepjavalibrary:master Aug 17, 2022
@frankfliu frankfliu deleted the normalize branch August 17, 2022 22:11
patins1 pushed a commit to patins1/djl that referenced this pull request Aug 26, 2022
Change-Id: I877cd924ecada008a53b852092dc224fa1cfa70b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants