Skip to content

[REF] Forward pass factory#2

Merged
ltatzel merged 1 commit intodevelopfrom
refactor-forward-func-factory
Oct 27, 2021
Merged

[REF] Forward pass factory#2
ltatzel merged 1 commit intodevelopfrom
refactor-forward-func-factory

Conversation

@f-dangel
Copy link
Collaborator

Closures for optimizers can be created with get_batch_loss_and_accuracy_func. I removed duplication and extracted the accuracy computation and which mode (autodiff turned on/off) is used. This makes it easier to write new problems.

  • Some type annotations
  • Raise an exception for invalid values of phases (train, eval, ...)

Should be merged before #1 because introducing the letter can now be done with less code.

Also raise an exception for invalid phases
@f-dangel f-dangel requested a review from ltatzel September 22, 2021 09:07
@f-dangel f-dangel changed the title Refactor forward pass factory [REF] Forward pass factory Sep 22, 2021
@ltatzel ltatzel merged commit 7f0f689 into develop Oct 27, 2021
@ltatzel ltatzel deleted the refactor-forward-func-factory branch October 27, 2021 08:26
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

Successfully merging this pull request may close these issues.

2 participants