keras_lookahead icon indicating copy to clipboard operation
keras_lookahead copied to clipboard

'Model' object has no attribute '_uses_dynamic_learning_phase'

Open caoyuanjie1996 opened this issue 4 years ago • 2 comments

Traceback (most recent call last): File "G:/yolov4-tiny-keras-master/train.py", line 266, in lookahead.inject(model) File "G:\yolov4-tiny-keras-master\lookahead.py", line 29, in inject if model._uses_dynamic_learning_phase(): AttributeError: 'Model' object has no attribute '_uses_dynamic_learning_phase'

caoyuanjie1996 avatar Oct 20 '20 07:10 caoyuanjie1996

This may be due to a keras version mismatch, which I have also experienced. You can solve the problem in this way: " pip install keras==2.2.4 " ;

wenfan-wenfan avatar Nov 17 '20 08:11 wenfan-wenfan

This may be due to a keras version mismatch, which I have also experienced. You can solve the problem in this way: " pip install keras==2.2.4 " ;

thnak you,i have been pip install keras 2.2.4,and it is successful.but lookahead look like not enough great for loss,maybe my epoch is too small

caoyuanjie1996 avatar Nov 17 '20 08:11 caoyuanjie1996