How deal with this question 'X can't be expression'?

optimizer=optim.SGD(model.parameters().lr=1e-3)
^
SyntaxError: keyword can’t be an expression

I think if you change

optimizer=optim.SGD(model.parameters().lr=1e-3)

to

optimizer=optim.SGD(model.parameters(), lr=1e-3)

then it will work

1 Like

oh,so awkward,thank you very much

1 Like