avoid crash if `checkpoint['epoch']` is undefined and logging enabled
diff --git a/timm/models/_helpers.py b/timm/models/_helpers.py
index 530da0e1b2..079a4ddaee 100644
--- a/timm/models/_helpers.py
+++ b/timm/models/_helpers.py
@@ -136,8 +136,8 @@ def resume_checkpoint(
                 if 'version' in checkpoint and checkpoint['version'] > 1:
                     resume_epoch += 1  # start at the next epoch, old checkpoints incremented before save
 
-            if log_info:
-                _logger.info("Loaded checkpoint '{}' (epoch {})".format(checkpoint_path, checkpoint['epoch']))
+                if log_info:
+                    _logger.info("Loaded checkpoint '{}' (epoch {})".format(checkpoint_path, checkpoint['epoch']))
         else:
             model.load_state_dict(checkpoint)
             if log_info:
