-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathconfig.py
73 lines (53 loc) · 1.79 KB
/
config.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import math
# This file to contain all the config variables shared across modules
# This is time time difference in frames used to calc the speed value. If it
# takes more than this many frames to get a tick, the speed will be 0.
odo_delta = 6
# The laptop has very little GPU memory, so we have to scale down to run on it.
running_on_laptop = True
# Should tensorflow use the GPU - only for the car, this var not used for training.
should_use_gpu = 0
camera_id = 1
# Uncomment the following line to specify the path of the trained mdodel, or put the uncommented line in local_config.py.
# If no tf_checkpoint_file variable is found, the latest generated model is loaded.
#tf_checkpoint_file = "/Users/otaviogood/convnet02-results/2016_11_06__04_48_13_PM/model.ckpt"
# Either alexnet or lstm. Use lower case.
neural_net_mode = 'alexnet'
# Neural net input params for image sizes
width = 128
height = 128
width_small = 16
height_small = 16
img_channels = 3
# JSON cache of local settings (path to latest training data folder, model checkpoint, ...)
# Loads a setting
def load(what):
import json
try:
js = json.load(open('dyn_config.json','r'))
except:
js = dict()
if not js.has_key(what): return None
return js[what]
# Stores a setting
def store(what, val):
import json
try:
js = json.load(open('dyn_config.json','r'))
except:
js = dict()
js[what] = val
with open('dyn_config.json', 'w') as fp:
json.dump(js, fp, indent=4)
# Create local_config.py to override local settings
try :
from local_config import *
except:
pass
CAR_HOST='omba.local'
CAR_DIR='/Users/otaviogood/Documents/devmac/carputer/'
CAR_SYNC_LOCAL_DIR='/Users/otaviogood/training-images-sync/'
CAR_SYNC_METHOD='airdrop'
CAR_AIRDROP_FOLDER='/Users/otaviogood/Downloads/'
stuck_override=True
use_override_random_error=False