Conv1d

https://pytorch.org/docs/stable/generated/torch.nn.Conv1d.html

Load Conv1d
import svetoviz_webgpu as sv

# 1. Prepare 1D sequence data (Batch, Channels, Length)
sequence_length = 100
sequence_data = torch.randn(1, 1, sequence_length)

# 2. Define the 1D Convolutional module
conv1d = nn.Conv1d(in_channels=1, out_channels=8, kernel_size=3, stride=1)

def terminal_callback(buffer, message, images, files):
    # 3. Process the sequence through the module
    output = conv1d(sequence_data)

    # Log the output shape to the Svetoviz terminal
    buffer.send_system_message(f"Processed signal. Output shape: {list(output.shape)}")

# 4. Start the interactive session
sv.pytorch(module=conv1d, terminal_callback=terminal_callback)
Select output value to see input weight bias output relation.
Conv1d activations
Select output value to see input weight bias output relation.
Conv1d Mapping
Conv1d mapping
The visualization traces the 1D sliding window, mapping output indices back to their receptive fields in the input signal.