Load weights model_data/yolo_weights.h5.
Freeze the first 249 layers of total 252 layers.
Traceback (most recent call last):
File "train.py", line 203, in
_main()
File "train.py", line 46, in _main
freeze_body=2, weights_path='model_data/yolo_weights.h5') # make sure you know what you freeze
File "train.py", line 143, in create_model
[*model_body.output, *y_true])
File "C:\Users\diaoc.conda\envs\tf21\lib\site-packages\tensorflow_core\python\keras\engine\base_layer.py", line 773, in call
outputs = call_fn(cast_inputs, *args, **kwargs)
File "C:\Users\diaoc.conda\envs\tf21\lib\site-packages\tensorflow_core\python\keras\layers\core.py", line 846, in call
result = self.function(inputs, **kwargs)
File "C:\Users\diaoc\tf20\yolov3_fake_refactor\yolo3\model.py", line 412, in yolo_loss
_, ignore_mask = K.control_flow_ops.while_loop(lambda b,*args: b<m, loop_body, [0, ignore_mask])
AttributeError: module 'tensorflow.keras.backend' has no attribute 'control_flow_ops'
但是源文件是可以在backend.py下找到from tensorflow.python.ops import control_flow_ops的。