You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I have a question on how I can instantiate a class that requires multiple parameters that determined during run time only?
I followed the example on Optimizer but can't figure out how I can expand it to multiple parameters:
Setting class_path to __main__.SGD produces another error:
usage: example.py [-h] [--optimizer OPTIMIZER]
example.py: error: Parser key "optimizer":
Type typing.Callable[[typing.Iterable, float], __main__.Optimizer] expects a function or a callable class: Expected '__main__.SGD' to be a class that instantiates into callable or a subclass of False.. Got value: Namespace(class_path='__main__.SGD', init_args=Namespace(lr=0.01))
The text was updated successfully, but these errors were encountered:
Hello, I have a question on how I can instantiate a class that requires multiple parameters that determined during run time only?
I followed the example on Optimizer but can't figure out how I can expand it to multiple parameters:
Let's say I want to add one more parameter to
SGD(params, weight, lr)
. How will the flow change?gives the following error:
Setting
class_path
to__main__.SGD
produces another error:The text was updated successfully, but these errors were encountered: