### Start NAM Full-Featured Trainer Source: https://github.com/sdatkinson/neural-amp-modeler/blob/main/docs/source/tutorials/full.md Execute this command in the terminal to launch the full-featured NAM trainer after installation. ```console $ nam-full ``` -------------------------------- ### Install neural-amp-modeler Source: https://github.com/sdatkinson/neural-amp-modeler/blob/main/docs/source/installation.md Install the neural-amp-modeler package using pip after setting up PyTorch. ```bash $ pip install neural-amp-modeler ``` -------------------------------- ### Install GPU PyTorch Source: https://github.com/sdatkinson/neural-amp-modeler/blob/main/docs/source/installation.md Install a GPU-compatible version of PyTorch. This command is for CUDA 12.9. Refer to the PyTorch website for the most up-to-date instructions. ```bash $ pip install torch --index-url https://download.pytorch.org/whl/cu129 ``` -------------------------------- ### Update neural-amp-modeler Source: https://github.com/sdatkinson/neural-amp-modeler/blob/main/docs/source/installation.md Update an existing installation of the neural-amp-modeler package to the latest version. ```bash pip install --upgrade neural-amp-modeler ``` -------------------------------- ### Slimmable Training Class Hierarchy Source: https://github.com/sdatkinson/neural-amp-modeler/blob/main/nam/models/wavenet/slimmable.md This diagram illustrates the inheritance structure of slimmable modules, starting from nn.Module and extending to specialized layers like _SlimmableConv1dBase and its subclasses. ```text nn.Module ├── _Slimmable (ABC, nn.Module) │ │ Mixin: manages _adjust_size ratio (0–1); adjust_to(), adjust_to_random(), context_adjust_to_random() │ │ │ ├── _WaveNet (_Slimmable, nn.Module) │ │ Top-level model; propagates adjust_to() to child modules │ │ │ └── _SlimmableConv1dBase (nn.Conv1d, _Slimmable) │ Base: abstract _get_adjusted_weight_and_bias(); forward() uses sliced w,b when adjusted │ │ │ ├── _SlimmableRechannelIn │ │ Rechannel into layer array. First layer: slice out only; later: slice in and out. │ │ _max_adjust_size = out_channels │ │ │ ├── _SlimmableConvLayer │ │ Layer conv: channels → mid_channels. Gated: mid=2*ch, slice w[:2*adj,:adj,:] │ │ _max_adjust_size = in_channels │ │ │ ├── _SlimmableInputMixer │ │ Condition → mid_channels. Slice output only. │ │ _max_adjust_size = out_channels │ │ │ ├── _Slimmable1x1 │ │ 1×1 in residual path. Slice both in and out (in_channels == out_channels). │ │ _max_adjust_size = in_channels (= out_channels) │ │ │ └── _SlimmableHeadRechannel │ channels → 1. Slice input only. │ _max_adjust_size = in_channels ``` -------------------------------- ### Check PyTorch GPU Availability Source: https://github.com/sdatkinson/neural-amp-modeler/blob/main/docs/source/installation.md Verify if PyTorch can detect and use the NVIDIA GPU. If this returns 'False', your PyTorch installation needs to be fixed. ```python import torch; print(torch.cuda.is_available()) ``` -------------------------------- ### Check PyTorch GPU Version Source: https://github.com/sdatkinson/neural-amp-modeler/blob/main/docs/source/installation.md Confirm that the installed PyTorch version supports the GPU. A version string containing 'cu' indicates GPU support. ```python import torch; print(torch.__version__) ``` -------------------------------- ### Build Documentation Locally (Linux) Source: https://github.com/sdatkinson/neural-amp-modeler/blob/main/README.md Use this command to build the documentation locally on a Linux system. Ensure you are in the 'docs' directory. ```bash cd docs make html ``` -------------------------------- ### Run NAM Full-Featured Training Source: https://github.com/sdatkinson/neural-amp-modeler/blob/main/docs/source/tutorials/full.md Initiate the training process by providing the paths to your data, model, and learning configuration files, along with the desired output directory. ```console nam-full \ path/to/data.json \ path/to/model.json \ path/to/learning.json \ path/to/outputs ``` -------------------------------- ### Build Documentation Locally (Windows) Source: https://github.com/sdatkinson/neural-amp-modeler/blob/main/README.md Use this command to build the documentation locally on a Windows system. Ensure you are in the 'docs' directory. ```bat cd docs make.bat html ``` -------------------------------- ### Run Packed Training with Full Trainer Source: https://github.com/sdatkinson/neural-amp-modeler/blob/main/docs/source/tutorials/packed-training.md Use the normal full trainer command with 'PackedWaveNet' in the model config. No extra command-line flags are needed. ```console $ nam-full path/to/data.json path/to/model.json path/to/learning.json path/to/outputs ``` -------------------------------- ### Launch NAM GUI Trainer Source: https://github.com/sdatkinson/neural-amp-modeler/blob/main/docs/source/tutorials/gui.md Run this command in your terminal to launch the graphical user interface for training NAM models. ```console $ nam ``` -------------------------------- ### Configure Data Path for Training Source: https://github.com/sdatkinson/neural-amp-modeler/blob/main/docs/source/tutorials/full.md Edit the data configuration file to specify the paths to your input and output audio files. Ensure the 'delay' parameter accurately reflects the latency in samples between the two files. ```json "common": { "x_path": "C:\\path\\to\\input.wav", "y_path": "C:\\path\\to\\output.wav", "delay": 0 } ``` -------------------------------- ### Uninstall PyTorch Components Source: https://github.com/sdatkinson/neural-amp-modeler/blob/main/docs/source/installation.md Uninstall PyTorch and related libraries. This is a step before reinstalling to fix GPU issues. ```bash $ pip uninstall torch torchvision torchaudio ``` -------------------------------- ### Packed WaveNet Model Configuration Source: https://github.com/sdatkinson/neural-amp-modeler/blob/main/docs/source/tutorials/packed-training.md Configure packed training by specifying 'PackedWaveNet' as the model name and defining submodels with their respective configurations. Temporal settings must match across submodels, while channel counts can differ. ```json { "net": { "name": "PackedWaveNet", "config": { "submodels": [ { "name": "small", "config": { "layers_configs": [ { "input_size": 1, "condition_size": 1, "channels": 3, "head": {"out_channels": 1, "kernel_size": 1, "bias": true}, "kernel_size": 6, "dilations": [1, 5, 29, 97, 227], "activation": "LeakyReLU" } ], "head": null, "head_scale": 0.01 } }, { "name": "large", "config": { "layers_configs": [ { "input_size": 1, "condition_size": 1, "channels": 8, "head": {"out_channels": 1, "kernel_size": 1, "bias": true}, "kernel_size": 6, "dilations": [1, 5, 29, 97, 227], "activation": "LeakyReLU" } ], "head": null, "head_scale": 0.01 } } ], "export": { "container_max_values": "uniform" } } } } ``` -------------------------------- ### Helper Function for Channel Calculation Source: https://github.com/sdatkinson/neural-amp-modeler/blob/main/nam/models/wavenet/slimmable.md This helper function calculates the number of channels based on a given ratio and maximum size, ensuring a minimum of 1 channel. ```python _ratio_to_channels(ratio, max_size) → 1 + min(floor(ratio * max_size), max_size - 1) ``` -------------------------------- ### Slice Semantics for Weight Tensors Source: https://github.com/sdatkinson/neural-amp-modeler/blob/main/nam/models/wavenet/slimmable.md This table details how weight tensors (w) and biases (b) are sliced for different slimmable classes, specifying the slicing logic and any relevant notes for each. ```text Class | Slicing | Notes |-------------------------|---------------------------------------|------------------------------- | _SlimmableRechannelIn | first: w[:adj,:,:]; later: w[:adj,:adj,:] | Rechannel into layer array |_SlimmableConvLayer | gated: w[:2*adj,:adj,:], b[:2*adj]; else: w[:adj,:adj,:] | Dilated conv, optional gate |_SlimmableInputMixer | w[:adj,:,:], b[:adj] | Condition mixer |_Slimmable1x1 | w[:adj,:adj,:], b[:adj] | Residual path 1×1 |_SlimmableHeadRechannel | w[:,:adj,:], b unchanged | Head: channels → 1 ``` -------------------------------- ### Data Flow in Slimmable Mode Source: https://github.com/sdatkinson/neural-amp-modeler/blob/main/nam/models/wavenet/slimmable.md This diagram outlines the data flow through the slimmable components of the WaveNet model, showing how data is processed by rechanneling layers, main layers, and the head rechanneling layer. ```text _LayerArray (slimmable=True) │ ├── _rechannel: _SlimmableRechannelIn (input_size → channels) │ ├── _layers[i]: _Layer │ ├── _conv: _SlimmableConvLayer (channels → mid_channels; gated) │ ├── _input_mixer: _SlimmableInputMixer (condition_size → mid_channels) │ └── _layer1x1: _Slimmable1x1 (bottleneck → channels) │ └── _head_rechannel: _SlimmableHeadRechannel (channels → ``head.out_channels``; kernel_size 1 only for slimmable) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.