how to change this torch to flax?
lu-ming-lei opened this issue · comments
lu-ming-lei commented
optimizer = torch.optim.Adam([variable1, variable2], 0.001)
how to change this torch to flax?
I try this but no success: optimizer = flax.optim.Adam([variable1, variable2], 0.001)
joao guilherme commented
Hey @lu-ming-lei can you provide a longer code snippet? In Flax we don't pass the variables we want to optmize when initialising the optimizer
lu-ming-lei commented
optimizer = torch.optim.Adam([
{'params': variables1, 'lr':0.1},
{'params': variables2, 'lr':0.01},
])
how to change this code into flax?