tfjs icon indicating copy to clipboard operation
tfjs copied to clipboard

The prediction results from keras and tfjs are different

Open Panepo opened this issue 8 years ago • 2 comments

TensorFlow.js version

0.13.0

Browser version

Chrome 69.0.3497.100

Describe the problem or feature request

Hi there,

I am trying to build a image super resolution app by using keras and tfjs. The tfjs model is converted from keras model via tfjs-converter. The app works well if the width and height of input image are the same, but fails if not.

Then I try to reproduce the bug on keras and notice that the output tensors from tfjs and keras are quite different if the width and height of input image are not equal. (The output tensors are the same if the width and height of input image are equal.)

Is it a bug or something wrong on my code? Thanks

Panepo avatar Sep 19 '18 08:09 Panepo

Hi Panepo,

Can you share a bit of your code to show how to reproduce the problem?

Thanks.

bileschi avatar Sep 19 '18 13:09 bileschi

Hi @bileschi ,

Nevermind. The problem comes from my image spliting function since WebGL will lose context if the input image is too large. Thanks

Panepo avatar Sep 20 '18 06:09 Panepo