ypeleg / nfnets-keras

Keras implementation of Normalizer-Free Networks and SGD - Adaptive Gradient Clipping
MIT License
68 stars 21 forks source link

How to use SGD_AGC class ?? #8

Open edwardcho opened 3 years ago

edwardcho commented 3 years ago

Hell Sir.

I tried your code but I met some error.

This is my code.

    optimizer = SGD_AGC(lr=0.01)

Error :

    TypeError: __init__() missing 1 required positional argument: 'params'

So I checked your code.

class SGD_AGC(Optimizer):
    ...
    def __init__(self, params, lr, ....):
    ...

I think that this is the style of optimizer of pytorch. How to use SGD_AGC class in keras.

Thanks..

Sicily-F commented 3 years ago

There's an answer from another user here: https://github.com/ypeleg/nfnets-keras/issues/7