diff --git a/lib/backends/webgl/ops/leaky-relu.ts b/lib/backends/webgl/ops/leaky-relu.ts index 83fb01cd..a2f5eb90 100644 --- a/lib/backends/webgl/ops/leaky-relu.ts +++ b/lib/backends/webgl/ops/leaky-relu.ts @@ -19,7 +19,7 @@ export class WebGLLeakyRelu extends LeakyRelu implements WebGLOperator { uniform sampler2D A; void main() { float v = texture2D(A, TexCoords).r; - gl_FragColor = vec4(v < 0.0 ? v * ${this.alpha} : v); + gl_FragColor = vec4(v < 0.0 ? v * float(${this.alpha}) : v); } `; return {