zaidalyafeai / ml-projects

Implementation of web friendly ML models using TensorFlow.js. pix2pix, face segmentation, fast style transfer and many more ...
MIT License
648 stars 254 forks source link

Warning occurred while load the model #10

Closed Panepo closed 5 years ago

Panepo commented 5 years ago

Hi @zaidalyafeai

I was trying to inference your model by official tensorflow-js library version 0.13.0. But warning occurred while load some of the models, something like The shape of the input tensor ([null,128,128,32]) does not match the expectation of layer conv2d_2: [null,256,256,3]

Is there something wrong on my code? Thanks

zaidalyafeai commented 5 years ago

Which model? If it is pix2pix then I used a modified version of tfjs because the official version is not implementing a certain functionality that I needed.

Panepo commented 5 years ago

Right

Both the pix2pix and Webcam Style Transfer have the same warning.

JeremyJamesG commented 5 years ago

hey @zaidalyafeai , what modified version of tfjs did you use with pix2pix?

zaidalyafeai commented 5 years ago

@JeremyJamesG, I had to edit the source code of tfjs to modify the batchnorm which has a bug. Not sure if it was fixed yet.

JeremyJamesG commented 5 years ago

great, thanks @zaidalyafeai

clkruse commented 4 years ago

@zaidalyafeai would you be able to share more info about your batch norm patch? I'm trying to upgrade to the latest TFJS, and have fixed most of the issues, but my output predictions are unchanging based on the input, and are random noise.

I also have the shape issue (which led me to this issue), but that also happens without the tfjs script in the repo and the outputs are still valid.

zaidalyafeai commented 4 years ago

@clkruse there is a related issue https://github.com/tensorflow/tfjs/issues/562