keras_lookahead icon indicating copy to clipboard operation
keras_lookahead copied to clipboard

lookahead optimizer for keras

Results 8 keras_lookahead issues
Sort by recently updated
recently updated
newest added

I'm getting the following error,AttributeError: 'Sequential' object has no attribute '_Lookahead__check__trainable_weights_consistency' The tensorflow and keras versions used are both 2.8, how to solve this

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'

29 model._feed_targets + 30 model._feed_sample_weights) ---> 31 if model._uses_dynamic_learning_phase(): 32 inputs += [K.learning_phase()] 33 fast_params = model._collected_trainable_weights AttributeError: 'Sequential' object has no attribute '_uses_dynamic_learning_phase'

how do you choose the value of alpha?

What is the point of [these lines](https://github.com/bojone/keras_lookahead/blob/master/lookahead.py#L60)?: ``` K.batch_get_value(slow_updates) K.batch_get_value(copy_updates) ``` `K.batch_get_value` returns a value that isn't stored anywhere - also, `slow_updates` and `copy_updates` are ultimately unused anywhere.

model.metric_tensors doesn't exist in tf.keras with tensorflow 2.0

builtins.AttributeError: 'Model' object has no attribute '_check_trainable_weights_consistency'