dfalbel / capsnet

CapsNet implementation in keras for R
Other
12 stars 3 forks source link

create_capsnet function doesnt work #2

Open couyang24 opened 6 years ago

couyang24 commented 6 years ago

Thank you so much for such a cutting edge package! I was trying to run through the sample code for MNIST dataset but when I run the create_capsnet function, it gave me the following error message. Do you know if there is a way to fix it?

Error in py_call_impl(callable, dots$args, dots$keywords) : RuntimeError: Evaluation error: RuntimeError: Evaluation error: ValueError: Dimension 0 in both shapes must be equal, but are 1 and 1152 for 'r_layer_1/scan/while/MatMul' (op: 'BatchMatMul') with input shapes: [1,10,?,8], [1152,10,8,16].

Detailed traceback: File "C:\Users\Owen\ANACON~1\envs\R-TENS~1\lib\site-packages\keras\backend\tensorflow_backend.py", line 1127, in batch_dot out = tf.matmul(x, y, adjoint_a=adj_x, adjoint_b=adj_y) File "C:\Users\Owen\ANACON~1\envs\R-TENS~1\lib\site-packages\tensorflow\python\ops\math_ops.py", line 1861, in matmul a, b, adj_x=adjoint_a, adj_y=adjoint_b, name=name) File "C:\Users\Owen\ANACON~1\envs\R-TENS~1\lib\site-packages\tensorflow\python\ops\gen_math_ops.py", line 708, in _batch_mat_mul "BatchMatMul", x=x, y=y, adj_x=adj_x, adj_y=adj_y, name=name) File "C:\Users\Owen\ANACON~1\envs\R-TENS~1\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper op_def=op_def) File "C:\Us

dfalbel commented 6 years ago

Sorry, I couldn't reproduce the error in my computer. Can you provide your sessionInfo? You can also try running just the create_capsnet function in a fresh R session.

Thank you for trying it out! It's still somewhat buggy at the moment.

couyang24 commented 6 years ago

Thanks for your reply. I have tried a fresh R session but it doesn't work and I was using R version 3.4.2. I have updated to 3.5 but still not working. Cannot wait to try this awesome new model.

Owen Ouyang Data Scientist Wattsworth Analysis Inc. Phone: (519) 495-1469 Email: oouyang@wattsworth.com

On Thu, May 10, 2018 at 10:46 AM, Daniel Falbel notifications@github.com wrote:

Sorry, I couldn't reproduce the error in my computer. Can you provide your sessionInfo? You can also try running just the create_capsnet function in a fresh R session.

Thank you for trying it out! It's still somewhat buggy at the moment.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dfalbel/capsnet/issues/2#issuecomment-388075862, or mute the thread https://github.com/notifications/unsubscribe-auth/AdaL8one6FzI0wpytHI7ZPtUsAKCcbDhks5txFLPgaJpZM4T59Kk .

dfalbel commented 6 years ago

What's your keras version? Can you install the most recent keras from GitHub? devotos::install_github("rstudio/keras")

couyang24 commented 6 years ago

Thanks Daniel. I have update keras to 2.1.6.9001 but there is still the same error :(

Owen Ouyang Data Scientist Wattsworth Analysis Inc. Phone: (519) 495-1469 Email: oouyang@wattsworth.com

On Thu, May 10, 2018 at 12:11 PM, Daniel Falbel notifications@github.com wrote:

What's your keras version? Can you install the most recent keras from GitHub? devotos::install_github("rstudio/keras")

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dfalbel/capsnet/issues/2#issuecomment-388102294, or mute the thread https://github.com/notifications/unsubscribe-auth/AdaL8hZHeTN5r-XrzxH9cY6FHIxse4Huks5txGaigaJpZM4T59Kk .

dfalbel commented 6 years ago

Sorry for taking long to answer :( Can you tell me your Tensorflow version?

couyang24 commented 6 years ago

Thanks man. I just attached the screenshot to this comment.

image

SUNBERG010 commented 5 years ago

Hi Daniel, Thank you for your work. However, I also encounter the problem same as Owen Ouyang, my tensorflow version is 1.10, could you please tell me the solution? Thank you so much.