YangWangsky / tf_EEGLearn

A tensorflow implementation for EEGLearn
MIT License
77 stars 31 forks source link

Mean accuracy #5

Closed zhangyubrain closed 5 years ago

zhangyubrain commented 5 years ago

Hi Yang,

Thanks for the nice reimplementation and it provides a very good demo for people to learn these deep learning methods with tensorflow.

BTW, I just found a very small bug in your code. When you calculate the mean accuracy, the code only takes the first 12 subjects into account but ignores the last one. Seems this line: acc_mean = np.mean(acc_buf[:,:-1], axis=1).reshape(-1, 1), should be moved one step down. Could you take a look and check if I am wrong?

Also, I got a much slower running speed using tensorflow GPU than using CPU. Do you have any idea about this issue?

Thanks again!

Best, Yu

zhangyubrain commented 5 years ago

Sorry, I meant that this line: acc_mean = np.mean(acc_buf[:,:-1], axis=1).reshape(-1, 1), should be changed into: acc_mean = np.mean(acc_buf, axis=1).reshape(-1, 1)

YangWangsky commented 5 years ago

Yeah, you are right, thank you for your advice. As for GPU speed, there could be many possible reasons. Maybe you can check your GPU environment such as Nvidia driver, Cuda, Cudnn and so on. Please ensure your GPU is used by TensorFlow.