You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please, could all strings in Keras be replaced by enums, which is the, may i say 'proper' way of representing symbols?
besides being the 'proper' way, any error would be caught in the editor's syntax checker ( optimizer.sgb (error here) instead of only being detected at runtime (optimizer='sgb' )
Ex. instead of model.compile( optimizer='sgd', loss='binary_crossentropy', metrics = ['accuracy', 'mae'] ):
model.compile( [ optimizer.sgd, loss.binary_crossentropy, metrics.accuracy , metrics.mae, ... ], ... )
then, inside model.compile, there would be a parser for the first argument (a list of enums) and the corresponding assignments based on the class of each enum (for e in enum_list: if class(e) == optimizer: optimizer=e.value, etc etc
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Please, could all strings in Keras be replaced by enums, which is the, may i say 'proper' way of representing symbols?
besides being the 'proper' way, any error would be caught in the editor's syntax checker ( optimizer.sgb (error here) instead of only being detected at runtime (optimizer='sgb' )
Ex. instead of model.compile( optimizer='sgd', loss='binary_crossentropy', metrics = ['accuracy', 'mae'] ):
model.compile( [ optimizer.sgd, loss.binary_crossentropy, metrics.accuracy , metrics.mae, ... ], ... )
then, inside model.compile, there would be a parser for the first argument (a list of enums) and the corresponding assignments based on the class of each enum (for e in enum_list: if class(e) == optimizer: optimizer=e.value, etc etc
Beta Was this translation helpful? Give feedback.
All reactions