Skip to content

Instantly share code, notes, and snippets.

View pathikg's full-sized avatar
✈️
Learning

Pathik Prashant Ghugare pathikg

✈️
Learning
View GitHub Profile
@pathikg
pathikg / set_seeds.py
Last active June 24, 2022 10:53
Set random seed in python for numpy, os, random. tensorflow and pytorch
import os
import random
import numpy as np
import tensorflow as tf
import torch
def set_seed(seed=42):
"""
sets the integer starting value used in generating random numbers.
comment out packages/frameworks not in use as per your choice