Skip to content
Snippets Groups Projects
Commit 7b26456e authored by Erik Nygren's avatar Erik Nygren :bullettrain_front:
Browse files

Merge branch 'master' into 'master'

fix path error when executing from cmd.

See merge request !5
parents 81e6e103 899b0f72
No related branches found
No related tags found
1 merge request!5fix path error when executing from cmd.
*pycache* *pycache*
*ppo_policy* *ppo_policy*
torch_training/Nets/
...@@ -20,7 +20,7 @@ double_dqn = True # If using double dqn algorithm ...@@ -20,7 +20,7 @@ double_dqn = True # If using double dqn algorithm
input_channels = 5 # Number of Input channels input_channels = 5 # Number of Input channels
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
device = torch.device("cpu") #device = torch.device("cpu")
print(device) print(device)
......
...@@ -4,6 +4,11 @@ import random ...@@ -4,6 +4,11 @@ import random
import sys import sys
from collections import deque from collections import deque
# make sure the root path is in system path
from pathlib import Path
base_dir = Path(__file__).resolve().parent.parent
sys.path.append(str(base_dir))
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import numpy as np import numpy as np
import torch import torch
......
...@@ -3,6 +3,11 @@ import random ...@@ -3,6 +3,11 @@ import random
import sys import sys
from collections import deque from collections import deque
# make sure the root path is in system path
from pathlib import Path
base_dir = Path(__file__).resolve().parent.parent
sys.path.append(str(base_dir))
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import numpy as np import numpy as np
import torch import torch
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment