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

render pipeline + cs pipeline makes result incorrect #17

Open
GreyZzzzzzXh opened this issue Jun 10, 2019 · 1 comment
Open

render pipeline + cs pipeline makes result incorrect #17

GreyZzzzzzXh opened this issue Jun 10, 2019 · 1 comment

Comments

@GreyZzzzzzXh
Copy link

TEST ENV:
Windows10, Chrome Canary(Version 77.0.3819.0), D3D11 backend.

CASE:

const inputShape = [1,3,3,1]; /*Ni,Hi,Wi,Ci*/
const filterShape = [2,2,1,1]; /*Hk,Wk,Ci,Co*/
const stride = 1;
const pad = 'valid';

const x = tf.tensor4d([1,2,3,4,5,6,7,8,9], inputShape);
const w = tf.tensor4d([1,1,1,1], filterShape);

const result = tf.conv2d(x, w, stride, pad);
result.print(1);

this case will use 3 ops:

if changing im2col or packTensor to render pipeline, result will be wrong.

wrong result:

Tensor
  dtype: float32
  rank: 4
  shape: [1,2,2,1]
  values:
    [[[[0],
       [0]],

      [[0],
       [0]]]]
@GreyZzzzzzXh
Copy link
Author

TEST ENV:
Windows10, Chrome Canary(Version 77.0.3819.0), D3D11 backend.

CASE: tfjs-examples, mobilenet

if changing im2col to render pipeline, result will be wrong.

wrong result:
image

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

No branches or pull requests

1 participant