1.0.0-alpha2, 1.1.2
latest
Hello there!
I'm trying to load graph model in js browser and make a predict on tensor (1, 512). Model is loaded successfully, but on predict i received an error:
conv2d: depth of input (4) must match input depth for filter 512.
Looks like, the problem is an unsupported NCHW data format in conv2d.


This question is better asked on StackOverflow since it is not a bug or feature request. There is also a larger community that reads questions there.
@rthadur but can you give me any feedback about NCHW support in conv2d op? I didn't found any notes about this in code.
I'm going to re-open this as it is a potential feature request. As per the API docs NCHW is not currently supported in tf.conv2d (only NHCW). But we would be open to PRs to add support for that format. The code for conv2d is here.
I'll note that the issue is not specific to frozen models.
Hi @tafsiri , I sent a PR tensorflow/tfjs-core#1791 to make conv2d support NCHW dataFormat, could you please take a look at it? Thanks!
Related PR has been merged, thank you all.