Open YAwei666 opened 5 years ago
This might be an issue with the TensorFlow version you are using.
Replace gather with this function:
def gather_axis(params, indices, axis=0): return tf.stack(tf.unstack(tf.gather(tf.unstack(params, axis=axis), indices)), axis=axis)
File "inference.py", line 13, in inference capsnet = Caps3d() File "/home/wyw/VideoCapsuleNet-master/caps_network.py", line 37, in init self.init_network() File "/home/wyw/VideoCapsuleNet-master/caps_network.py", line 129, in init_network padding='VALID', name='sec_caps', route_mean=True) File "/home/wyw/VideoCapsuleNet-master/caps_layers.py", line 348, in create_conv3d_caps d_gathered = tf.gather(u_padded, d_offsets, axis=1) TypeError: gather() got an unexpected keyword argument 'axis'