当先锋百科网

首页 1 2 3 4 5 6 7

报错信息:

PS D:\VOCdevkit\VOC2008> python convert.py yolov3.cfg yolov3.weights model_data/yolo.h5
Traceback (most recent call last):
  File "convert.py", line 34, in <module>
    from keras.layers.normalization import BatchNormalization
ImportError: cannot import name 'BatchNormalization'

解决方法:

在这里插入图片描述

将from keras.layers.normalization import BatchNormalization
                                   **改成**
 from keras.layers.normalization.batch_normalization_v1 import BatchNormalization