forked from GMvandeVen/brain-inspired-replay
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrep_hypers.py
35 lines (29 loc) · 1.44 KB
/
rep_hypers.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 24 16:25:19 2021
@author: jackm
"""
#! /usr/bin/env python3
import subprocess
# Whether to use KL or JS divergence...
kl_js_list = ['kl', 'js']
# Selectrion factors...
f_list = [1.25, 1.5, 2, 2.5, 3, 3.5, 4, 5]
#for kl_js in kl_js_list:
# for f in f_list:
# subprocess.run(['tsp', '-S 1', 'hare', 'run', '--rm', '-d', '--workdir /app', '-v "$(pwd)":/app', \
# '--user $(id', '-u):$(id', '-g)', '--gpus', '\'\"device=3,4\"\'', 'jlm67/project', \
# 'python3', 'main_cl.py', '--experiment=splitMNIST', '--scenario=class', \
# '--replay=generative', '--brain-inspired', '--si', '--repulsion', '--kl-js={}'.format(kl_js), \
# '--use-rep-f', '--rep-f={}'.format(f), '--tuning', 'iters=500'], )
try:
result = subprocess.run(['tsp', '-S 1', 'hare', 'run', '--rm', '--workdir /app', '-v "$(pwd)":/app', \
'--user $(id', '-u):$(id', '-g)', '--gpus', '\'\"device=3,4\"\'', 'jlm67/project', \
'python3', 'main_cl.py', '--experiment=splitMNIST', '--scenario=class', \
'--replay=generative', '--brain-inspired', '--si', '--repulsion', '--kl-js={}'.format('js'), \
'--use-rep-f', '--rep-f={}'.format(1.5), '--tuning', 'iters=50'], universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
print("stdout:", result.stdout)
print("stderr:", result.stderr)
print("code:", result.returncode)
except FileNotFoundError as e:
print(e)