Issue
How do I set up a manual seed for mps devices using pytorch? With cuda devices the code should work like this:
if torch.cuda.is_available():
torch.cuda.manual_seed(0)
I'm using an apple m1 chip. The following statement returns True:
torch.backends.mps.is_available()
But following statement is not possible:
torch.backends.mps.manual_seed(0)
Solution
According to the docs:
You can use torch.manual_seed() to seed the RNG for all devices (both CPU and CUDA):
import torch
torch.manual_seed(0)
Answered By - Tamir
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.