您当前的位置: 首页 >  ar
  • 0浏览

    0关注

    2393博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

成功解决but is 0 and 2 (computed from start 0 and end 9223372 over shape with rank 2 and stride-1)

一个处女座的程序猿 发布时间:2021-11-10 01:06:15 ,浏览量:0

成功解决Exception "unhandled ValueError" Subshape must have computed start >= end since stride is negative, but is 0 and 2 (computed from start 0 and end 9223372036854775807 over shape with rank 2 and stride-1)

目录

解决问题

解决思路

解决方法

解决问题

Exception "unhandled ValueError" Subshape must have computed start >= end since stride is negative, but is 0 and 2 (computed from start 0 and end 9223372036854775807 over shape with rank 2 and stride-1)

解决思路

异常“未处理的ValueError” 子形状必须计算开始>=结束,因为步幅为负数,但为0和2(从开始0和结束9223372036854775807开始计算,在等级为2和步幅为1的形状上)

解决方法

参考文章:https://stackoverflow.com/questions/57558476/training-a-keras-model-yields-multiple-optimizer-errors

修改yolo3/model.py文件的140/141行 :

box_xy = (K.sigmoid(feats[..., :2]) + grid) / K.cast(grid_shape[::-1], K.dtype(feats))
box_wh = K.exp(feats[..., 2:4]) * anchors_tensor / K.cast(input_shape[::-1], K.dtype(feats))

改为

box_xy = (K.sigmoid(feats[..., :2]) + grid) / K.cast(grid_shape[...,::-1], K.dtype(feats))
box_wh = K.exp(feats[..., 2:4]) * anchors_tensor / K.cast(input_shape[...,::-1], K.dtype(feats))

 

关注
打赏
1664196048
查看更多评论
立即登录/注册

微信扫码登录

0.0454s