www0wwwjs1 / Matrix-Capsules-EM-Tensorflow

A Tensorflow implementation of CapsNet based on paper Matrix Capsules with EM Routing
Apache License 2.0
218 stars 83 forks source link

tf.matmul slows training and causes low GPU usage. #35

Open convnets opened 6 years ago

convnets commented 6 years ago

In capsule_em.py,

votes = tf.reshape(tf.matmul(output, w), [batch_size, caps_num_i, caps_num_c, 16]) when training withtf.matmul, gpu usage is very low, usually around 50% or less sometimes. Why does this happen ?