XifengGuo / CapsNet-Keras

A Keras implementation of CapsNet in NIPS2017 paper "Dynamic Routing Between Capsules". Now test error = 0.34%.
MIT License
2.46k stars 652 forks source link

How much time it takes to train the model? #27

Closed Runkun-Lu closed 6 years ago

Runkun-Lu commented 6 years ago

My server has two 1080ti, however, I almost spent 10 hours or more to run your code. What should I modify in your code?

XifengGuo commented 6 years ago

@GongYangYu I tested on my PC:
About 80s / epoch on a single GTX 1080Ti GPU. Total time is about one hour.
About 55s / epoch on two GTX 1080Ti GPU by using capsulenet-multi-gpu.py. Total time is 46 minutes.

In your case, It may be due to the CUDA configuration. I'm using CUDA-8.0, cudnn v6.0, keras v2.0.9, tensorflow v1.4. Are you able to run on another computer?

Runkun-Lu commented 6 years ago

thank you, but sorry, I had made a mistake, I would ask this question in "naturomics/CapsNet-Tensorflow". I am in the run place. 囧

Lynten commented 6 years ago

I have trained your code with default settings on GTX 1080. But it seems to take a long time(more than 10 minutes/epoch). It it normal?

_20180305072617

Ubuntu 16.04 tensorflow-gpu (1.4.1) Keras (2.1.4)

$ cat /usr/local/cuda/version.txt
CUDA Version 8.0.61
$ cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
#define CUDNN_MAJOR      6
#define CUDNN_MINOR      0
#define CUDNN_PATCHLEVEL 20
--
#define CUDNN_VERSION    (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)

#include "driver_types.h"