Hi everyone,
I have a question that how to optimize all parameters if model A includes model B?
For example,
class Model_B:
def init():
…
class Model_A:
def init():
self.b = Model_B()
And then (in main.py)
…
a = Model_A()
optim.SGD(a.parameters(), lr=0.001, momentum=0.9) # Does it optimize the parameters of Model A and Model B??
Thanks.