← 开源

RAdam implemented in Keras & TensorFlow

Model DevelopmentTraining toolkitsPython
增长势头
+024 小时新增 Star0.0%
325
Star
43
Fork
+0
本周
0
贡献者
创建于 2019-08-16 · 更新于 2026-10-13 · 今日第 26884 名
README

Keras RAdam

[中文|English]

Unofficial implementation of RAdam in Keras.

Install

pip install keras-rectified-adam

External Link

Usage

from tensorflow import keras
import numpy as np
from keras_radam import RAdam

# Build toy model with RAdam optimizer
model = keras.models.Sequential()
model.add(keras.layers.Dense(input_shape=(17,), units=3))
model.compile(RAdam(), loss='mse')

# Generate toy data
x = np.random.standard_normal((4096 * 30, 17))
w = np.random.standard_normal((17, 3))
y = np.dot(x, w)

# Fit
model.fit(x, y, epochs=5)

Use Warmup

from keras_radam import RAdam

RAdam(total_steps=10000, warmup_proportion=0.1, min_lr=1e-5)
排名相邻
同类项目

AI Rank iPhone 版

随时追踪 AI 模型榜单

在 App Store 下载