TypeError: slice indices must be integers or None or have an __index__ method
2017-09-17 18:47
1001 查看
在训练faster-rcnn自己的网络结构和数据集时,出现了
TypeError: slice indices must be integers or None or have an index method
根据错误提示查看了当前出错的点的数据类型,一般为numpy.int32和numpy.float64。 但是这两种数据类型不能作为index(能作为index的只有int、None、和index容器) 所以将该类型强制修改为int,但是错误越来越多,最后查明是numpy版本问题。 自从numpy1.12.0就对数据类型转换的与之前不同,所以只需将numpy版本降低 运行:
sudo pip intall -U numpy==1.11.0
大功告成
相关文章推荐
- faster rcnn报错:TypeError: slice indices must be integers or None or have an __index__ method
- TypeError: slice indices must be integers or None or have an index method
- TypeError: slice indices must be integers or None or have an __index__ method
- TypeError: slice indices must be integers or None or have an index method
- 错误异常slice indices must be integers or None or have
- 快速解决Python问题:TypeError: list indices must be integers or slices, not str
- TypeError: list indices must be integers or slices, not tuple
- python错误:TypeError: string indices must be integers
- python错误:TypeError: string indices must be integers
- Pymongo: TypeError: if no direction is specified, key_or_list must be an instance of list
- TypeError: string indices must be integers, not str
- 读取页面返回字典值提示错误:TypeError: string indices must be integers, not str
- 处理错误TypeError: initial_value must be unicode or None, not str
- Uncaught TypeError: Super expression must either be null or a function, not undefine
- TypeError:exceptions must be old-style classes or derived from BaseException, not str
- TypeError: unbound method must be called with class instance 1st argument
- error : A file found in a source-path must have an externally visible definition. If a definition in the file is meant to be ext
- matlab错误:Subscript indices must either be real positive integers or logicals.
- list indices must be integers or slices, not tuple
- list indices must be integers or slices, not tuple