models icon indicating copy to clipboard operation
models copied to clipboard

TypeError: only integer scalar arrays can be converted to a scalar index

Open jiayalu123 opened this issue 6 years ago • 6 comments

有人遇到过这么问题吗?

jiayalu123 avatar Dec 11 '19 08:12 jiayalu123

有人遇到过这么问题吗?

请问是调用哪个API报出的该错误,以及是否有相关代码可以看一下

liym27 avatar Dec 11 '19 08:12 liym27

这个代码你跑起来了吗?在测试得时候,我的一直报错,tensorflow.python.framework.errors_impl.InvalidArgumentError: Inputs to operation transformer/transformer-1/multi_head_atten/Select of type Select must have the same size and shape. Input 0: [8,100,100] != input 1: [1024,100,100]

jiayalu123 avatar Dec 13 '19 03:12 jiayalu123

这个代码你跑起来了吗?在测试得时候,我的一直报错,tensorflow.python.framework.errors_impl.InvalidArgumentError: Inputs to operation transformer/transformer-1/multi_head_atten/Select of type Select must have the same size and shape. Input 0: [8,100,100] != input 1: [1024,100,100]

请问是哪个模型的报错?

liym27 avatar Dec 13 '19 07:12 liym27

transformer 预测的时候报错,

jiayalu123 avatar Dec 13 '19 08:12 jiayalu123

transformer 预测的时候报错,

请问是动态图还是静态图,哪一个文件?使用的paddle版本以及环境是什么?

liym27 avatar Dec 13 '19 08:12 liym27

你好,你能提供的执行环境、paddle版本、运行命令、以及数据 吗?

zhengya01 avatar Dec 17 '19 08:12 zhengya01