Skip to content

Commit

Permalink
fix clip
Browse files Browse the repository at this point in the history
  • Loading branch information
fs-eire committed Sep 13, 2022
1 parent 41274ba commit 55af08e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/web/lib/onnxjs/backends/webgpu/ops/unary-op.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ export const clip = (handler: WebGpuInferenceHandler, inputs: Tensor[], attribut
handler.run(
createElementwiseProgramInfoLoader(
inputs[0], 'clip', `
let clip_min_: f32 = f32(${attributes.min});
let clip_max_: f32 = f32(${attributes.max});
let clip_min_: vec4<f32> = vec4(f32(${attributes.min}));
let clip_max_: vec4<f32> = vec4(f32(${attributes.max}));
fn clip(x: vec4<f32>) -> vec4<f32> {
return clamp(x, clip_min_, clip_max_);
Expand Down

0 comments on commit 55af08e

Please sign in to comment.