Skip to content

Commit

Permalink
Local import of PyTorch and TensorFlow for env flexibility
Browse files Browse the repository at this point in the history
  • Loading branch information
cgpotts committed Apr 25, 2019
1 parent 4f02dd9 commit 472d405
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
from sklearn.model_selection import GridSearchCV
import sys
import os
import torch
import tensorflow as tf

__author__ = "Christopher Potts"
__version__ = "CS224u, Stanford, Spring 2019"
Expand Down Expand Up @@ -269,6 +267,8 @@ def fix_random_seeds(
https://stackoverflow.com/questions/30585108/disable-hash-randomization-from-within-python-program
"""
import torch
import tensorflow as tf
# set system seed
if set_system:
np.random.seed(seed)
Expand Down

0 comments on commit 472d405

Please sign in to comment.