-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Resizing Layer #6879
Resizing Layer #6879
Commits on Sep 29, 2022
-
Updating to tfjs master: latest (#41)
* Update jasmine_util.ts (tensorflow#6872) FIX * webgl: Fix NaN issue (tensorflow#6828) Fix tensorflow#6822 Problem 1: On some GPUs, even if a and b are both non-NaN, the value of isNaN in vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0)); are still larger than 0., which misleads all values become NAN. 2: After resolving NAN issue, the result is still incorrect. It seems that the isnan_custom is not well supported on the problem GPU. After switching back to builtin isnan, everything works well. Solution: Use the bool type bvec4 instead of float type vec4 to calculate isNaN to avoid the the float precision issue when comparing with zero. Meanwhile, add an env flag WEBGL2_ISNAN_CUSTOM to allow user to specify which isnan to use. * Upgrade nodejs to 18.7.0 (tensorflow#6863) * Upgrade nodejs to 18.7.0 * Fix hash table test string not passed as base64 * fixed prelu fusing code that pre-maturely neg the const on multiply (tensorflow#6876) Co-authored-by: RajeshT <43972606+rthadur@users.noreply.github.com> Co-authored-by: Linchenn <40653845+Linchenn@users.noreply.github.com> Co-authored-by: Jiajia Qin <jiajia.qin@intel.com> Co-authored-by: Matthew Soulanille <msoulanille@google.com> Co-authored-by: Ping Yu <4018+pyu10055@users.noreply.github.com> Co-authored-by: RajeshT <43972606+rthadur@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for aa484a6 - Browse repository at this point
Copy the full SHA aa484a6View commit details -
Implementation of preprocessing image resizing layer (#42)
* Implementation of preprocessing image resizing layer Important Note: The lower-level op implementation of image resizing-nearest neighbor in TensorFlow.js differs from the implementation of the comparable op in Keras-Python. While the Python version of the op function always selects the bottom right cell of the sub-matrix to be used as the representative value of that region in the downscaled matrix, the JavaScript implementation defaults to the top left cell of the sub-matrix, and then preferentially shifts to the right side of the sub-matrix in all sub-matrices past the lateral halfway point ( calculated by floor((length-1)/2) ), and the bottom side of the sub-matrix in all sub-matrices past the vertical halfway point, when considering the top-left side of the parent matrix as the origin. This causes a slight variation in the output values from nearest neighbor downscaling between the Python and JavaScript versions of the code as it currently stands, and the unit tests for the resizing layer has been implemented to reflect this difference in op-function behavior. Co-authored-by: Adam Lang (@AdamLang96) <adamglang96@gmail.com> Co-authored-by: Brian Zheng (@Brianzheng123) <brianzheng345@gmail.com> * Updating image preprocessing test file to include approved usage of CodeSmith licensing header Co-authored-by: Adam Lang (@AdamLang96) <adamglang96@gmail.com> Co-authored-by: Brian Zheng (@Brianzheng123) <brianzheng345@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for e830d9f - Browse repository at this point
Copy the full SHA e830d9fView commit details -
Updating Resizing to Latest TFJS Master Branch (#43)
* Update jasmine_util.ts (tensorflow#6872) FIX * webgl: Fix NaN issue (tensorflow#6828) Fix tensorflow#6822 Problem 1: On some GPUs, even if a and b are both non-NaN, the value of isNaN in vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0)); are still larger than 0., which misleads all values become NAN. 2: After resolving NAN issue, the result is still incorrect. It seems that the isnan_custom is not well supported on the problem GPU. After switching back to builtin isnan, everything works well. Solution: Use the bool type bvec4 instead of float type vec4 to calculate isNaN to avoid the the float precision issue when comparing with zero. Meanwhile, add an env flag WEBGL2_ISNAN_CUSTOM to allow user to specify which isnan to use. * Upgrade nodejs to 18.7.0 (tensorflow#6863) * Upgrade nodejs to 18.7.0 * Fix hash table test string not passed as base64 * fixed prelu fusing code that pre-maturely neg the const on multiply (tensorflow#6876) Co-authored-by: RajeshT <43972606+rthadur@users.noreply.github.com> Co-authored-by: Linchenn <40653845+Linchenn@users.noreply.github.com> Co-authored-by: Jiajia Qin <jiajia.qin@intel.com> Co-authored-by: Matthew Soulanille <msoulanille@google.com> Co-authored-by: Ping Yu <4018+pyu10055@users.noreply.github.com> Co-authored-by: RajeshT <43972606+rthadur@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 9d09b67 - Browse repository at this point
Copy the full SHA 9d09b67View commit details
Commits on Sep 30, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 807fedf - Browse repository at this point
Copy the full SHA 807fedfView commit details
Commits on Oct 6, 2022
-
Refactored interpolation method type declaration (#54)
* Implementation of preprocessing image resizing layer Important Note: The lower-level op implementation of image resizing-nearest neighbor in TensorFlow.js differs from the implementation of the comparable op in Keras-Python. While the Python version of the op function always selects the bottom right cell of the sub-matrix to be used as the representative value of that region in the downscaled matrix, the JavaScript implementation defaults to the top left cell of the sub-matrix, and then preferentially shifts to the right side of the sub-matrix in all sub-matrices past the lateral halfway point ( calculated by floor((length-1)/2) ), and the bottom side of the sub-matrix in all sub-matrices past the vertical halfway point, when considering the top-left side of the parent matrix as the origin. This causes a slight variation in the output values from nearest neighbor downscaling between the Python and JavaScript versions of the code as it currently stands, and the unit tests for the resizing layer has been implemented to reflect this difference in op-function behavior. Co-authored-by: Adam Lang (@AdamLang96) <adamglang96@gmail.com> Co-authored-by: Brian Zheng (@Brianzheng123) <brianzheng345@gmail.com> * Updating image preprocessing test file to include approved usage of CodeSmith licensing header * refactored interpolation type declaration Co-authored-by: Adam Lang (@AdamLang96) <adamglang96@gmail.com> Co-authored-by: Brian Zheng (@Brianzheng123) <brianzheng345@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 066d46a - Browse repository at this point
Copy the full SHA 066d46aView commit details -
Minor spacing correction (#55)
* Implementation of preprocessing image resizing layer Important Note: The lower-level op implementation of image resizing-nearest neighbor in TensorFlow.js differs from the implementation of the comparable op in Keras-Python. While the Python version of the op function always selects the bottom right cell of the sub-matrix to be used as the representative value of that region in the downscaled matrix, the JavaScript implementation defaults to the top left cell of the sub-matrix, and then preferentially shifts to the right side of the sub-matrix in all sub-matrices past the lateral halfway point ( calculated by floor((length-1)/2) ), and the bottom side of the sub-matrix in all sub-matrices past the vertical halfway point, when considering the top-left side of the parent matrix as the origin. This causes a slight variation in the output values from nearest neighbor downscaling between the Python and JavaScript versions of the code as it currently stands, and the unit tests for the resizing layer has been implemented to reflect this difference in op-function behavior. Co-authored-by: Adam Lang (@AdamLang96) <adamglang96@gmail.com> Co-authored-by: Brian Zheng (@Brianzheng123) <brianzheng345@gmail.com> * Updating image preprocessing test file to include approved usage of CodeSmith licensing header * refactored interpolation type declaration * minor spacing correction Co-authored-by: Adam Lang (@AdamLang96) <adamglang96@gmail.com> Co-authored-by: Brian Zheng (@Brianzheng123) <brianzheng345@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for d5d8c17 - Browse repository at this point
Copy the full SHA d5d8c17View commit details -
Configuration menu - View commit details
-
Copy full SHA for 05d0837 - Browse repository at this point
Copy the full SHA 05d0837View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5e57be4 - Browse repository at this point
Copy the full SHA 5e57be4View commit details
Commits on Oct 7, 2022
-
Configuration menu - View commit details
-
Copy full SHA for e90cc76 - Browse repository at this point
Copy the full SHA e90cc76View commit details -
Update tfjs-layers/src/layers/preprocessing/image_resizing_test.ts
Co-authored-by: Matthew Soulanille <matthew@soulanille.net>
Configuration menu - View commit details
-
Copy full SHA for e16cace - Browse repository at this point
Copy the full SHA e16caceView commit details -
Resizing layer unit test assertion argument casting error refactored (#…
…57) * Implementation of preprocessing image resizing layer Important Note: The lower-level op implementation of image resizing-nearest neighbor in TensorFlow.js differs from the implementation of the comparable op in Keras-Python. While the Python version of the op function always selects the bottom right cell of the sub-matrix to be used as the representative value of that region in the downscaled matrix, the JavaScript implementation defaults to the top left cell of the sub-matrix, and then preferentially shifts to the right side of the sub-matrix in all sub-matrices past the lateral halfway point ( calculated by floor((length-1)/2) ), and the bottom side of the sub-matrix in all sub-matrices past the vertical halfway point, when considering the top-left side of the parent matrix as the origin. This causes a slight variation in the output values from nearest neighbor downscaling between the Python and JavaScript versions of the code as it currently stands, and the unit tests for the resizing layer has been implemented to reflect this difference in op-function behavior. Co-authored-by: Adam Lang (@AdamLang96) <adamglang96@gmail.com> Co-authored-by: Brian Zheng (@Brianzheng123) <brianzheng345@gmail.com> * Updating image preprocessing test file to include approved usage of CodeSmith licensing header * refactored interpolation type declaration * minor spacing correction * resizing layer test assertion statement argument casting refactored Co-authored-by: Adam Lang (@AdamLang96) <adamglang96@gmail.com> Co-authored-by: Brian Zheng (@Brianzheng123) <brianzheng345@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 641c3a6 - Browse repository at this point
Copy the full SHA 641c3a6View commit details -
Resizing layer unit test assertion line length exceeded refactored (#58)
* Implementation of preprocessing image resizing layer Important Note: The lower-level op implementation of image resizing-nearest neighbor in TensorFlow.js differs from the implementation of the comparable op in Keras-Python. While the Python version of the op function always selects the bottom right cell of the sub-matrix to be used as the representative value of that region in the downscaled matrix, the JavaScript implementation defaults to the top left cell of the sub-matrix, and then preferentially shifts to the right side of the sub-matrix in all sub-matrices past the lateral halfway point ( calculated by floor((length-1)/2) ), and the bottom side of the sub-matrix in all sub-matrices past the vertical halfway point, when considering the top-left side of the parent matrix as the origin. This causes a slight variation in the output values from nearest neighbor downscaling between the Python and JavaScript versions of the code as it currently stands, and the unit tests for the resizing layer has been implemented to reflect this difference in op-function behavior. Co-authored-by: Adam Lang (@AdamLang96) <adamglang96@gmail.com> Co-authored-by: Brian Zheng (@Brianzheng123) <brianzheng345@gmail.com> * Updating image preprocessing test file to include approved usage of CodeSmith licensing header * refactored interpolation type declaration * minor spacing correction * resizing layer test assertion statement argument casting refactored * image resizing layer unit test assertion line max length exceeded refactored Co-authored-by: Adam Lang (@AdamLang96) <adamglang96@gmail.com> Co-authored-by: Brian Zheng (@Brianzheng123) <brianzheng345@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for c7f7f36 - Browse repository at this point
Copy the full SHA c7f7f36View commit details
Commits on Oct 11, 2022
-
Configuration menu - View commit details
-
Copy full SHA for d0bdcdb - Browse repository at this point
Copy the full SHA d0bdcdbView commit details