wendlerc / capsules-tensorflow

Another implementation of Hinton's capsule networks in tensorflow.
Apache License 2.0
19 stars 9 forks source link

ValueError: Dimensions must be equal #2

Open guddulrk opened 6 years ago

guddulrk commented 6 years ago

Hi mate, I am trying to run your program on my Characters dataset. But this shows the following error:

Dimensions must be equal, but are 68 and 128 for 'mul_1' (op: 'Mul') with input shapes: [128,68,68], [128,68].

In my case, there are 68 classes. therefore, I have changed depth value from 10 to 68. But still, it shows the error. Can you please help me?

wendlerc commented 6 years ago

Hi,

if you are still trying to resolve this problem please provide more context. What is the model definition you are using and in which file and line does the error occur. Otherwise, I recommend using the https://github.com/XifengGuo/CapsNet-Keras as I am currently working on other projects and not maintaining this one.

In principle, when you just want to support a new dataset that contains more classes you need to change the "DigitCaps layer:" digitcaps = caps.dense(primarycaps, 68, 16, ... and the input layer.

Best regards and sorry for the late answer, Chris

akare55 commented 4 years ago

Hi,

@guddulrk I have same error. Could you solve the problem. I'm trying to make a binary classifier and change code like this: digitcaps = caps.dense(primarycaps, 2, 16, ... . I put error lines images below hata3 hata1 hata2

hata