diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/gpu/effects/cnn_effect.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gpu/effects/cnn_effect.cc b/src/gpu/effects/cnn_effect.cc index d74187c..e12c26f 100644 --- a/src/gpu/effects/cnn_effect.cc +++ b/src/gpu/effects/cnn_effect.cc @@ -97,7 +97,8 @@ void CNNEffect::update_bind_group(WGPUTextureView input_view) { wgpuBindGroupRelease(bind_group_); WGPUBindGroupLayout bgl = wgpuRenderPipelineGetBindGroupLayout(pipeline_, 0); - WGPUSampler sampler = SamplerCache::Get().get_or_create(ctx_.device, SamplerCache::linear()); + // Use clamp (not repeat) to match PyTorch Conv2d zero-padding behavior + WGPUSampler sampler = SamplerCache::Get().get_or_create(ctx_.device, SamplerCache::clamp()); bind_group_ = BindGroupBuilder() .sampler(0, sampler) |
