import { n as m, v as f, ag as p, d as u, h as c } from "../index-DSGwv2Yx.js";
import { g as d, r as l } from "../dropout_util-N0z8Os-K.js";
import { mul16 as g } from "./mul16.js";
import { f as h } from "../floor-CymuCmTO.js";
function x(t, o, s, e) {
  const r = m(t, "x", "dropout");
  if (f(o >= 0 && o < 1, () => `rate must be a float in the range [0, 1), but got ${o}.`), o === 0)
    return t instanceof p ? r.clone() : r;
  const a = d(r, s), n = 1 - o, i = u(h(c(l(a, 0, 1, "float32", e), n)), n);
  return g(r, i);
}
export {
  x as dropout
};
