bojone / Capsule

A Capsule Implement with Pure Keras
350 stars 107 forks source link

Meeting an error #5

Open ghost opened 6 years ago

ghost commented 6 years ago

The program is leaving me an error while running For "cnn = Conv2D(64, (3, 3), activation='relu')(input_image)" in line 41 An error returns like "ValueError: The channel dimension of the inputs should be defined. Found None."

Keras version == 2.1.5

Thanks for your contribution!~

bojone commented 6 years ago

check your ~/.keras/keras.json. the image_data_format must be channels_last

RYFan-RS commented 6 years ago

I used you model on a 224*224 RGB dataset ,and get a error of "loss = nan" or both loss and acc don't changes .

bojone commented 6 years ago

@FlyDogFan

"loss not change" seems like capsule's problem, not my implement~

you can try to replace K.epsilon() with 1e-3 in squash function in Capsule_Keras.py to solve nan problem.

liuyang1273 commented 5 years ago

I used you model on a 60*80 RGB dataset ,and get a error of acc don't changes . @bojone

Ponyo1 commented 4 years ago

Thank you. After change the squash function. The model work properly.