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)