<jupyter_start><jupyter_text>torch_core Type an introduction of the package here.<jupyter_code>from fastai.gen_doc.nbdoc import *
from fastai.torch_core import *<jupyter_output><empty_output><jupyter_text>Global Variable Definitions: `AdamW = partial(optim.Adam, betas=(0.9,0.99))` [source] `AffineFunc = Callable[[KWArgs], AffineMatrix]` [source] `AffineMatrix = Tensor` [source] `BoolOrTensor = Union[bool,Tensor]` [source] `CoordFunc = Callable[[FlowField, TensorImageSize, ArgStar, KWArgs], LogitTensorImage]` [source] `FloatOrTensor = Union[float,Tensor]` [source] `FlowField = Tensor` [source] `HookFunc = Callable[[Model, Tensors, Tensors], Any]` [source] `ItemsList = Collection[Union[Tensor,ItemBase,'ItemsList',float,int]]` [source] `LambdaFunc = Callable[[Tensor],Tensor]` [source] `LayerFunc = Callable[[nn.Module],None]` [source] `LightingFunc = Callable[[LogitTensorImage, ArgStar, KWArgs], LogitTensorImage]` [source] `LogitTensorImage = TensorImage` [source] `LossFunction = Callable[[Tensor, Tensor], Rank0Tensor]` [source] `MetricFunc = Callable[[Tensor,Tensor],TensorOrNumber]` [source] `MetricFuncList = Collection[MetricFunc]` [source] `MetricsList = Collection[TensorOrNumber]` [source] `Model = nn.Module` [source] `ModuleList = Collection[nn.Module]` [source] `OptLossFunc = Optional[LossFunction]` [source] `OptMetrics = Optional[MetricsList]` [source] `OptOptimizer = Optional[optim.Optimizer]` [source] `OptSplitFunc = Optional[SplitFunc]` [source] `ParamList = Collection[nn.Parameter]` [source] `PixelFunc = Callable[[TensorImage, ArgStar, KWArgs], TensorImage]` [source] `Rank0Tensor = NewType('OneEltTensor', Tensor)` [source] `SplitFunc = Callable[[Model], List[Model]]` [source] `SplitFuncOrIdxList = Union[Callable, Collection[ModuleList]]` [source] `TensorImage = Tensor` [source] `TensorImageSize = Tuple[int,int,int]` [source] `TensorOrNumList = Collection[TensorOrNumber]` [source] `TensorOrNumber = Union[Tensor,Number]` [source] `Tensors = Union[Tensor, Collection['Tensors']]` [source] `Weights = Dict[str,Tensor]` [source] `bn_types = (nn.BatchNorm1d, nn.BatchNorm2d, nn.BatchNorm3d)` [source] `default_device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')` [source] `flatten_model=lambda l: sum(map(flatten_model,l.children()),[]) if num_children(l) else [l]` [source]<jupyter_code>show_doc(apply_init)<jupyter_output><empty_output><jupyter_text>[`apply_init`](/torch_core.htmlapply_init)<jupyter_code>show_doc(apply_leaf)<jupyter_output><empty_output><jupyter_text>[`apply_leaf`](/torch_core.htmlapply_leaf)<jupyter_code>show_doc(bn2float)<jupyter_output><empty_output><jupyter_text>[`bn2float`](/torch_core.htmlbn2float)<jupyter_code>show_doc(calc_loss)<jupyter_output><empty_output><jupyter_text>[`calc_loss`](/torch_core.htmlcalc_loss)<jupyter_code>show_doc(children)<jupyter_output><empty_output><jupyter_text>[`children`](/torch_core.htmlchildren)<jupyter_code>show_doc(cond_init)<jupyter_output><empty_output><jupyter_text>[`cond_init`](/torch_core.htmlcond_init)<jupyter_code>show_doc(data_collate)<jupyter_output><empty_output><jupyter_text>[`data_collate`](/torch_core.htmldata_collate)<jupyter_code>show_doc(first_layer)<jupyter_output><empty_output><jupyter_text>[`first_layer`](/torch_core.htmlfirst_layer)<jupyter_code>show_doc(flatten_model)<jupyter_output><empty_output><jupyter_text>[](fastai.torch_core.html)<jupyter_code>show_doc(in_channels)<jupyter_output><empty_output><jupyter_text>[`in_channels`](/torch_core.htmlin_channels)<jupyter_code>show_doc(model2half)<jupyter_output><empty_output><jupyter_text>[`model2half`](/torch_core.htmlmodel2half)<jupyter_code>show_doc(num_children)<jupyter_output><empty_output><jupyter_text>[`num_children`](/torch_core.htmlnum_children)<jupyter_code>show_doc(range_children)<jupyter_output><empty_output><jupyter_text>[`range_children`](/torch_core.htmlrange_children)<jupyter_code>show_doc(requires_grad)<jupyter_output><empty_output><jupyter_text>[`requires_grad`](/torch_core.htmlrequires_grad)<jupyter_code>show_doc(set_bn_eval)<jupyter_output><empty_output><jupyter_text>[`set_bn_eval`](/torch_core.htmlset_bn_eval)<jupyter_code>show_doc(split_bn_bias)<jupyter_output><empty_output><jupyter_text>[`split_bn_bias`](/torch_core.htmlsplit_bn_bias)<jupyter_code>show_doc(split_model)<jupyter_output><empty_output><jupyter_text>[`split_model`](/torch_core.htmlsplit_model)<jupyter_code>show_doc(split_model_idx)<jupyter_output><empty_output><jupyter_text>[`split_model_idx`](/torch_core.htmlsplit_model_idx)<jupyter_code>show_doc(to_data)<jupyter_output><empty_output><jupyter_text>[`to_data`](/torch_core.htmlto_data)<jupyter_code>show_doc(to_device)<jupyter_output><empty_output><jupyter_text>[`to_device`](/torch_core.htmlto_device)<jupyter_code>show_doc(to_half)<jupyter_output><empty_output><jupyter_text>[`to_half`](/torch_core.htmlto_half)<jupyter_code>show_doc(trainable_params)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1544058205335489, 'fraction_numerical': 0.0032336297493936943, 'mean_word_length': 18.18217054263566, 'pattern_counts': {'":': 0, '<': 93, '<?xml version=': 0, '>': 93, 'https://': 0, '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': '23', 'dir': 'jupyter-structured-clean-dedup', 'id': '574421', 'license': 'Apache-2.0', 'n_tokens_mistral': 1901, 'n_tokens_neox': 1848, 'n_words': 159, 'path': 'docs_src/torch_core.ipynb', 'repo_name': 'Gokkulnath/fastai_v1', 'size': '4948'}