Open GaganaB opened 4 years ago
@GaganaB Did you use the model
or eval_model
?
https://github.com/XifengGuo/CapsNet-Keras/blob/2f6d47dd205c7d77fc3d43626feee4c45d3c6db4/capsulenet.py#L242-L244
If you use model
, which is 2-in-2-out model, you should feed a tuple with 2 arrays, like outputs = model.predict(x, y)
.
https://github.com/XifengGuo/CapsNet-Keras/blob/2f6d47dd205c7d77fc3d43626feee4c45d3c6db4/capsulenet.py#L69
If you use eval_model
, which is a 1-in-2-out model, you should feed an array, like outputs = model.predict(x)
https://github.com/XifengGuo/CapsNet-Keras/blob/2f6d47dd205c7d77fc3d43626feee4c45d3c6db4/capsulenet.py#L70
Hi,
As I explained in this issue here: https://github.com/XifengGuo/CapsNet-Keras/issues/95 I was able to resolve exporting the model and trained weights.
throws the following error: ValueError: Error when checking model input: the list of Numpy arrays that you are passing to your model is not the size the model expected. Expected to see 2 array(s), but instead got the following list of 1 arrays: [array([[115, 164, 173, 170, 174, 167, 148, 125, 124, 126, 150, 191, 198, 206, 205, 209, 191, 180, 128, 109, 99, 67, 63, 58, 50, 41, 32, 41], [150, 173, 191, 188, 191, 1...
Any help is appreciated. Thanks.
Note: test_dicoms has the correct path and images are already 28 * 28 (verified with image.shape).