ValueError: List argument ‘indices‘ to ‘Sparse Concat‘ Op with length 0 shorter than minimum length2

错误ValueError: List argument ‘indices’ to ‘Sparse Concat’ Op with length 0 shorter than minimum length 2.

在实现github代码的时候,由于keras版本的原因把keras.backend.image_dim_ordering()更改为keras.backend.image_data_format(),‘th’和’tf’更改为’channels_first’和’channels_last’。之后程序运行时报错ValueError: List argument ‘indices’ to ‘Sparse Concat’ Op with length 0 shorter than minimum length 2.

经过查找发现,引用的另一个代码文件中的上述代码没有进行对应的更改,所以报错,把所有相关代码文件都改为现有版本keras的格式就可以消除这个错误。

猜你喜欢

转载自blog.csdn.net/weixin_41963310/article/details/109446911