Keras API 新旧对照表
作者:互联网
UserWarning: Update your `LSTM` call to the Keras 2 API: `LSTM(128, name="LSTMSpectral", kernel_regularizer=<keras.reg..., recurrent_regularizer=<keras.reg..., implementation=2)`
LSTM(128,name='LSTMSpectral',consume_less='gpu',W_regularizer=l2(0.0001),U_regularizer=l2(0.0001))(LSTMInput)
开始有些不明所以然,查了下面的表,OK。
legacy_recurrent_support = generate_legacy_interface( allowed_positional_args=['units'], conversions=[('output_dim', 'units'), ('init', 'kernel_initializer'), ('inner_init', 'recurrent_initializer'), ('inner_activation', 'recurrent_activation'), ('W_regularizer', 'kernel_regularizer'), ('b_regularizer', 'bias_regularizer'), ('U_regularizer', 'recurrent_regularizer'), ('dropout_W', 'dropout'), ('dropout_U', 'recurrent_dropout'), ('consume_less', 'implementation')], value_conversions={'consume_less': {'cpu': 0, 'mem': 1, 'gpu': 2}}, preprocessor=recurrent_args_preprocessor)
标签:kernel,consume,regularizer,less,dropout,recurrent,对照表,API,Keras 来源: https://blog.csdn.net/mikewzp/article/details/122721816