ConvTranspose3d

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

Sidenote: We continue using the T1w_MRI_Brain_Slices dataset. For this example, we use an encoder-decoder pattern to demonstrate volumetric reconstruction.
conv_transpose3d_demo.py
import svetoviz_webgpu as sv

# 1. Prepare 3D MRI volume (32 slices for clean striding)
ds = load_dataset("g4m3r/T1w_MRI_Brain_Slices", split="train", streaming=True)
slices = [np.array(ex['image'].resize((128, 128)).convert("L")) for ex in ds.skip(2).take(32)]
input_volume = torch.from_numpy(np.stack(slices)).unsqueeze(0).unsqueeze(0)

# 2. Encoder: Downsample (32, 128, 128) -> (16, 64, 64)
encoder = nn.Conv3d(in_channels=1, out_channels=8, kernel_size=3, stride=2, padding=1)

# 3. Decoder: Reconstruction with ConvTranspose3d
decoder = nn.ConvTranspose3d(in_channels=8, out_channels=1, kernel_size=4, stride=2, padding=1)

def terminal_callback(buffer, message, images, files):
    latent = encoder(input_volume)
    output = decoder(latent)
    buffer.send_system_message(f"Latent shape: {list(latent.shape)}")
    buffer.send_system_message(f"Reconstructed shape: {list(output.shape)}")

# 4. Start interactive session
sv.pytorch_web(module=decoder, terminal_callback=terminal_callback)
Activation input and output (theme light, flat)
ConvTranspose3d 3D activations
Output Mapping
ConvTranspose3d voxel mapping
Selected input value
ConvTranspose3d weights
Filter
ConvTranspose3d bias
3D Kernel
ConvTranspose3d volumetric features
Kernel frame
ConvTranspose3d 3D receptive field
Color map Plasma
ConvTranspose3d Plasma colormap
Color map Magma
ConvTranspose3d Magma colormap