Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable getter/setter #9

Open
bedapisl opened this issue Oct 1, 2018 · 0 comments
Open

Variable getter/setter #9

bedapisl opened this issue Oct 1, 2018 · 0 comments

Comments

@bedapisl
Copy link
Contributor

bedapisl commented Oct 1, 2018

Migrated from https://github.com/Cognexa/cxflow/issues/186

Original post:
Some variables, such as learning rate, are scalar, i.e. their shape doesn't depend on batch size. These variables can't be stated in the model outputs.

AddScalar hook should overcome this problem and add specific scalars to
epoch_data['train'][variable_name]

Such hook will be used in the beginning of the hook list.

Adam
This is actually back-end specific. We would need to enforce model API similar to this:

   @abstractmethod
   def get_variable_value(variable_name: str) -> Union[float, int, bool, str]:
      pass

   @abstractmethod
   def set_variable_value(variable_name: str, value: Union[float, int, bool, str]) -> None:
      pass

Which is actually quite interesting. We would be able to write more back-end agnostic hooks such as DecayLR etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant