mirror of
https://github.com/kuhyx/WUT_Computer_Science.git
synced 2026-07-04 16:03:11 +02:00
fix: fix pylint errors
This commit is contained in:
parent
9f271d07a6
commit
e09186eb4e
@ -69,12 +69,11 @@ def get_optimizer(model):
|
||||
""" Return optimizer function """
|
||||
if OPTIMIZER_TYPE == 'SGD':
|
||||
return optim.SGD(model.parameters(), lr=LEARNING_RATE)
|
||||
elif OPTIMIZER_TYPE == 'SGD_Momentum':
|
||||
if OPTIMIZER_TYPE == 'SGD_Momentum':
|
||||
return optim.SGD(model.parameters(), lr=LEARNING_RATE, momentum=0.9)
|
||||
elif OPTIMIZER_TYPE == 'Adam':
|
||||
if OPTIMIZER_TYPE == 'Adam':
|
||||
return optim.Adam(model.parameters(), lr=LEARNING_RATE)
|
||||
else:
|
||||
raise ValueError("Unsupported optimizer type!")
|
||||
raise ValueError("Unsupported optimizer type!")
|
||||
|
||||
|
||||
def initial_configuration():
|
||||
|
||||
Loading…
Reference in New Issue
Block a user