<commit_before>"""
The `learn` module includes classes that make it possible to define processing
graphs whose leaves are trained machine learning models.

While much of :module:`zounds.soundfile`, :module:`zounds.spectral`, and
:module:`zounds.timeseries` focus on processing nodes that can be composed into
a processing graph to extract features from a single piece of audio, the `learn`
module focuses on defining graphs that extract features or trained models from
an entire corpus of audio.
"""

from learn import KMeans, Learned

from preprocess import \
    MeanStdNormalization, UnitNorm, Log, PreprocessingPipeline, Multiply, \
    Slicer, InstanceScaling, Reshape, Weighted, MuLawCompressed, SimHash, \
    AbsoluteValue, Binarize, Sharpen

from sklearn_preprocessor import SklearnModel, WithComponents

from pytorch_model import \
    PyTorchAutoEncoder, PyTorchGan, PyTorchNetwork, GanTrainer, \
    WassersteinGanTrainer, SupervisedTrainer

from random_samples import ReservoirSampler, ShuffledSamples

from template_match import TemplateMatch

from util import \
    simple_settings, Conv1d, ConvTranspose1d, Conv2d, ConvTranspose2d


<commit_msg>Really fix pytorch related imports this time<commit_after>"""
The `learn` module includes classes that make it possible to define processing
graphs whose leaves are trained machine learning models.

While much of :module:`zounds.soundfile`, :module:`zounds.spectral`, and
:module:`zounds.timeseries` focus on processing nodes that can be composed into
a processing graph to extract features from a single piece of audio, the `learn`
module focuses on defining graphs that extract features or trained models from
an entire corpus of audio.
"""

from learn import KMeans, Learned

from preprocess import \
    MeanStdNormalization, UnitNorm, Log, PreprocessingPipeline, Multiply, \
    Slicer, InstanceScaling, Reshape, Weighted, MuLawCompressed, SimHash, \
    AbsoluteValue, Binarize, Sharpen

from sklearn_preprocessor import SklearnModel, WithComponents

from pytorch_model import \
    PyTorchAutoEncoder, PyTorchGan, PyTorchNetwork, GanTrainer, \
    WassersteinGanTrainer, SupervisedTrainer

from random_samples import ReservoirSampler, ShuffledSamples

from template_match import TemplateMatch

from util import simple_settings

try:
    from util import Conv1d, ConvTranspose1d, Conv2d, ConvTranspose2d
except ImportError:
    pass



{'fraction_non_alphanumeric': 0.05328892589508743, 'fraction_numerical': 0.0033305578684429643, 'mean_word_length': 5.619834710743802, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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}}
{'dir': 'git-commits-cleaned', 'id': '5416018', 'n_tokens_mistral': 674, 'n_tokens_neox': 651, 'n_words': 255}