Open eupston opened 4 years ago
Hello,
Were you able to fix this issue? if so can you share the sample code?
Thanks.
i am facing the same problem , in my python code i use this shape : data=data.reshape((1,28,28,1)) prediction = model.predict(data) and it workds in C++ i write: auto model = Model::load("example.model"); Tensor in{1, 28, 28, 1}; Tensor out = model(in); and i get the same error ? pliz any suggestions
Na I didn't end up solving it sorry. Decided to use: https://github.com/Dobiasd/frugally-deep which did the job for me.
Hello! Got the same problem when trying to use Conv2D with padding='same'. Solved by seting padding='valid' before training.
hi there,
I'm trying to run your code with my own model. The input shape for my prediction in python's keras is (1, 96, 114, 1), which works fine.
However when I create the same shaped Tensor in c++ and try to run the prediction I get:
ASSERT [src/layers/conv2d.cc:8] 'in.dims_[2] == weights_.dims_[3]' failed
my c++ code is:
Any ideas?