Spark in me - Internet, data science, math, deep learning, philo

snakers4 @ telegram, 1166 members, 1156 posts since 2016

All this - lost like tears in rain.

Internet, data science, math, deep learning, philosophy.
No bullshit.

На чай
- goo.gl/zveIOr
- Договор ТКС 5011673505

Сайт spark-in.me
Файл goo.gl/5VGU5A
Чат goo.gl/IS6Kzz

October 18, 04:47

Копипаста на pytorch для снижения lr по шагам.

...

parser.add_argument('--gamma', default=0.1, type=float, help='Gamma update for SGD')

...

...

stepvalues = (80000, 100000, 120000)

...

if iteration in stepvalues:

step_index += 1

adjust_learning_rate(optimizer, args.gamma, step_index)

...

def adjust_learning_rate(optimizer, gamma, step):

parser.add_argument('--gamma', default=0.1, type=float, help='Gamma update for SGD')

lr = args.lr * (gamma ** (step))

for param_group in optimizer.param_groups:

param_group['lr'] = lr#pytorch