Releases: Labbeti/torchoutil
Releases · Labbeti/torchoutil
Version 0.4.0
[0.4.0] 2024-05-27
Added
- Option
subdir_size
topack_dataset
. - Classes
CosDecayScheduler
andCosDecayRule
classes. - Function
sorted_dict
to collections. - Functions
ndim
andshape
to search information in tensor-like objects. - Function
item
to convert scalar-like objects to built-in scalar objects. - Mixin classes to improve module features.
Modified
- Rename
from_numpy
tonumpy_to_tensor
to avoid confusion withtorch.from_numpy
. - Rename
save_to_yaml
toto_yaml
andsave_to_csv
toto_csv
. - Rename
PickleDataset
toPackedDataset
. - Rename
pack_to_pickle
topack_dataset
. - Update
EModule
andESequential
classes with auto-config and auto-device detection.
Fixed
- Function
can_be_converted_to_tensor
now accepts numpy arrays and scalars. - Wildcard imports, and module imports. (e.g.
from torchoutil import nn
) can_be_stacked
now returns False with an empty sequence.
Version 0.3.1
[0.3.1] 2024-04-25
Added
- Method
count_parameters
toTModule
. - Option
padding_idx
toindices_to_onehot
function. - Functions
dict_list_to_list_dict
,flat_list
,unflat_dict_of_dict
to collections utils. - Class
PickleDataset
and functionpack_to_pickle
to utils. - Class
ResampleNearest
and functionresample_nearest
. - Class
TransformDrop
and functiontransform_drop
.
Fixed
- Remove invalid test file.
- Function
is_scalar
now returns True for numpy scalars when numpy package is installed.
Version 0.3.0
[0.3.0] 2024-04-17
Added
PositionalEncoding
layer for transformers networks.- Property
metadata
toHDFDataset
. - Function
create_params_groups_bias
for avoid apply weight decay to networks bias. - Functions
is_numpy_scalar
,is_torch_scalar
andunzip
. - Options
auto_open
,numpy_to_torch
andfile_kwargs
to customize loading inHDFDataset
.
Modified
- Update keyword arguments for mask, pad, labels functions and modules.
- Getting added column using
at
fromHDFDataset
whenreturn_added_columns
isFalse
. - Renamed
ModelCheckpointRegister
toRegistryHub
and add hash value check after download.
Fixed
can_be_converted_to_tensor
now returns True if input is a Tensor.
Version 0.2.2
[0.2.2] 2024-03-08
Fixed
ModelCheckpointRegister
now creates intermediate directories before download.MaskedMean
andMaskedSum
dim argument.
Version 0.2.1
[0.2.1] 2024-03-07
Added
ModelCheckpointRegister
class to make download and loading easier from checkpoint.
Modified
pack_to_hdf
now supports existing shape column.SizedDatasetLike
is now compatible withSequence
-like objects.
Version 0.2.0
[0.2.0] 2024-03-04
Added
- Optional hdf datasets with
HDFDataset
class andpack_to_hdf
function. - Multiclass functions to convert labels.
- Arg
diagonal
togenerate_square_subsequent_mask
. Abs
,Angle
,Real
andImag
modules.
Modified
- Use Literal for pad and crop functions typing.
- Minimal torch version is now 1.10.
Version 0.1.0
[0.1.0] 2024-01-29
Added
- 47 torch functions and 40 torch modules.