You could try to estimate the weights for the current epoch based on the unreduced loss and recreate a weighted criterion in the next epoch.
To get the raw, unreduced loss use reduction='none' while creating the criterion and check the losses for each sample in the current batch.