<jupyter_start><jupyter_text>Optimizers> This contains a set of optimizers.<jupyter_code>#export 
from tsai.imports import *
from fastai.optimizer import *
#export
import torch_optimizer as optim
#export
def wrap_optimizer(opt, **kwargs): return partial(OptimWrapper, opt=opt, **kwargs)<jupyter_output><empty_output><jupyter_text>You can natively use any of the optimizers included in the fastai library. You just need to pass it to the learner as the opt_func.In addition, you will be able to use any of the optimizers from: * Pytorch* torch_optimizer (https://github.com/jettify/pytorch-optimizer)If you want to use any these last 2, you can use the wrap_optimizer function. Here are a few examples:<jupyter_code>#export
adabelief = wrap_optimizer(optim.AdaBelief)
adamw = wrap_optimizer(torch.optim.AdamW)
#hide
out = create_scripts()
beep(out)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08437856328392246, 'fraction_numerical': 0.0011402508551881414, 'mean_word_length': 6.701754385964913, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 10, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '607094', 'license': 'Apache-2.0', 'n_tokens_mistral': 291, 'n_tokens_neox': 287, 'n_words': 92, 'path': 'nbs/053_optimizer.ipynb', 'repo_name': 'raijinspecial/tsai', 'size': '877'}