When setting the pad
to a number, the result of tf.avgPool3d is abnormal.
#7122
Labels
type:bug
Something isn't working
Please make sure that this is a bug. As per our
GitHub Policy,
we only address code/doc bugs, performance issues, feature requests and
build/installation issues on GitHub. tag:bug_template
System information
Describe the current behavior
The API document of Tensorflow.js states that the parameter
pad
in operatortf.avgPool3d
can be data of typenumber
. But when setting thepad
to a number, the result is abnormal.When running on the backend
CPU
, the values of output tensor are all NaN;When running on the backend
WebGL
, the values of output tensor are all 0 ;When running on the backend
Tensorflow
, the error is thrown with error message "TF Backend supports only 'valid' and 'same' padding while padding was NUMBER";When running on the backend
wasm
, the error is thrown with error message "Kernel 'AvgPool3D' not registered for backend 'wasm'";Describe the expected behavior
The implementation of
tf.avgPool3d
should be consistent across all backends and should be consistent with the description in the API documentation. In addition, whenpad
is set to a number, the operatortf.avgPool3d
should give the correct output instead of a tensor with the value0 or NaN
for any input.Standalone code to reproduce the issue
Provide a reproducible test case that is the bare minimum necessary to generate
the problem. If possible, please share a link to Colab/CodePen/any notebook.
Other info / logs Include any logs or source code that would be helpful to
diagnose the problem. If including tracebacks, please include the full
traceback. Large logs and files should be attached.
The text was updated successfully, but these errors were encountered: