Add docstrings to layer helper functions and modules #2634
Merged
+132
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Add Google-style docstrings to helper utilities in
timm/:layers/helpers.py:
_ntuple(),make_divisible(),extend_tuple()layers/space_to_depth.py:
SpaceToDepth,DepthToSpacelayers/format.py:
get_spatial_dim(),get_channel_dim(),nchw_to(),nhwc_to()layers/pool1d.py:
global_pool_nlc()layers/activations_me.py:
swish_fwd(),swish_bwd(),mish_fwd(),mish_bwd(),hard_sigmoid_fwd(),hard_sigmoid_bwd(),hard_swish_fwd(),hard_swish_bwd(),hard_mish_fwd(),hard_mish_bwd()models/_prune.py:
extract_layer(),set_layer(),adapt_model_from_string(),adapt_model_from_file()Core utility functions and modules used throughout the codebase that previously lacked documentation.
Changes
Testing