Skip to content

Commit 155f6e7

Browse files
committedJan 6, 2025·
Update README, few minor fixups.
·
v1.0.15v1.0.13
1 parent 2b251fb commit 155f6e7

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed
 

‎README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212

1313
## What's New
1414

15+
## Jan 6, 2025
16+
* Add `torch.utils.checkpoint.checkpoint()` wrapper in `timm.models` that defaults `use_reentrant=False`, unless `TIMM_REENTRANT_CKPT=1` is set in env.
17+
1518
## Dec 31, 2024
1619
* `convnext_nano` 384x384 ImageNet-12k pretrain & fine-tune. https://huggingface.co/models?search=convnext_nano%20r384
1720
* Add AIM-v2 encoders from https://github.com/apple/ml-aim, see on Hub: https://huggingface.co/models?search=timm%20aimv2

‎timm/layers/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,4 +162,4 @@ def use_reentrant_ckpt() -> bool:
162162

163163
def set_reentrant_ckpt(enable: bool = True):
164164
global _USE_REENTRANT_CKPT
165-
_USE_REENTRANT_CKPT = enable
165+
_USE_REENTRANT_CKPT = enable

‎timm/models/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
from ._helpers import clean_state_dict, load_state_dict, load_checkpoint, remap_state_dict, resume_checkpoint
9292
from ._hub import load_model_config_from_hf, load_state_dict_from_hf, push_to_hf_hub
9393
from ._manipulate import model_parameters, named_apply, named_modules, named_modules_with_params, \
94-
group_modules, group_parameters, checkpoint_seq, adapt_input_conv
94+
group_modules, group_parameters, checkpoint_seq, checkpoint, adapt_input_conv
9595
from ._pretrained import PretrainedCfg, DefaultCfg, filter_pretrained_cfg
9696
from ._prune import adapt_model_from_string
9797
from ._registry import split_model_name_tag, get_arch_name, generate_default_cfgs, register_model, \

‎timm/models/vision_transformer_sam.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from ._builder import build_model_with_cfg
2525
from ._features import feature_take_indices
2626
from ._features_fx import register_notrace_function
27-
from ._manipulate import checkpoint_seq, checkpoint
27+
from ._manipulate import checkpoint_seq
2828
from ._registry import generate_default_cfgs, register_model
2929

3030
# model_registry will add each entrypoint fn to this

0 commit comments

Comments
 (0)
Please sign in to comment.