美文网首页
Input ‘split_dim’ of ‘Split’ Op

Input ‘split_dim’ of ‘Split’ Op

作者: Do_More | 来源:发表于2017-12-06 11:26 被阅读0次

Input ‘split_dim’ of ‘Split’ Op has type float32 that does not match expected type of int32

This is because in Tensorflow versions < 0.12.0 the split function takes the arguments as:

x = tf.split(0, n_steps, x) # tf.split(axis, num_or_size_splits, value)
The tutorial you are working from was written for versions > 0.12.0, which has been changed to be consistent with Numpy’s split syntax:

x = tf.split(x, n_steps, 0) # tf.split(value, num_or_size_splits, axis)

相关文章

网友评论

      本文标题:Input ‘split_dim’ of ‘Split’ Op

      本文链接:https://www.haomeiwen.com/subject/uiykixtx.html