Skip to content

How could I find the current epoch number in the code? #1494

Closed Answered by Ezra-Yu
EdyQiu asked this question in General
Discussion options

You must be logged in to vote

Based on your needs, it is highly recommended that you use SwitchRecipeHook.

loss_after_30e = [dict(type='CE'), dict(type='Mine')]
loss_after_60e = [dict(type='CE')]
custom_hooks = [
    dict(
        type='SwitchRecipeHook',
        schedule=[
            dict(action_epoch=30, loss=loss_after_30e),
            dict(action_epoch=60, loss=loss_after_60e),
        ]
    )
]

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by EdyQiu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants