# Set a specific layer/operator to use non-deterministic mode

**URL:** <https://discuss.pytorch.org/t/set-a-specific-layer-operator-to-use-non-deterministic-mode/166379>\
**Category:** Uncategorized\
**Created:** [November 19, 2022, 10:02am UTC](https://discuss.pytorch.org/t/set-a-specific-layer-operator-to-use-non-deterministic-mode/166379 "2022-11-19T10:02:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pepper8362](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/p/9e8a1a/32.png) [@pepper8362](https://discuss.pytorch.org/u/pepper8362)\
**Post date:** [November 19, 2022, 10:02am UTC](https://discuss.pytorch.org/t/set-a-specific-layer-operator-to-use-non-deterministic-mode/166379/1 "2022-11-19T10:02:50Z")

</div>

Hi,

I try to use `torch.use_deterministic_algorithms(True)`, but some layers in my network does not support determinism. Is there a way to set those layers that do not support determinism to work in non-deterministic mode, while the other layers in deterministic mode?

Thanks.

---

<div class="post-metadata">

**Author:** ![ptrblck](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/ptrblck/32/1823_2.png) [@ptrblck](https://discuss.pytorch.org/u/ptrblck)\
**Post date:** [November 20, 2022, 5:01am UTC](https://discuss.pytorch.org/t/set-a-specific-layer-operator-to-use-non-deterministic-mode/166379/2 "2022-11-20T05:01:15Z")

</div>

No, I don’t think it’s possible to pick determinism for each module and `use_deterministic_algorithms` enables determinism for all used algorithms (or raises a warning/error if that’s not possible).
