forked from ryankiros/neural-storyteller
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.py
58 lines (49 loc) · 2.29 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
"""
Configuration for the generate module
"""
#-----------------------------------------------------------------------------#
# Flags for running on CPU
#-----------------------------------------------------------------------------#
FLAG_CPU_MODE = False
#-----------------------------------------------------------------------------#
# Paths to models and biases
#-----------------------------------------------------------------------------#
paths = dict()
# Skip-thoughts
paths['skmodels'] = '/u/rkiros/public_html/models/'
paths['sktables'] = '/u/rkiros/public_html/models/'
# Decoder
paths['decmodel'] = '/ais/gobi3/u/rkiros/storyteller/romance.npz'
paths['dictionary'] = '/ais/gobi3/u/rkiros/storyteller/romance_dictionary.pkl'
# Image-sentence embedding
paths['vsemodel'] = '/ais/gobi3/u/rkiros/storyteller/coco_embedding.npz'
# VGG-19 convnet
paths['vgg'] = '/ais/gobi3/u/rkiros/vgg/vgg19.pkl'
paths['pycaffe'] = '/u/yukun/Projects/caffe-run/python'
paths['vgg_proto_caffe'] = '/ais/guppy9/movie2text/neural-storyteller/models/VGG_ILSVRC_19_layers_deploy.prototxt'
paths['vgg_model_caffe'] = '/ais/guppy9/movie2text/neural-storyteller/models/VGG_ILSVRC_19_layers.caffemodel'
# COCO training captions
paths['captions'] = '/ais/gobi3/u/rkiros/storyteller/coco_train_caps.txt'
# Biases
paths['negbias'] = '/ais/gobi3/u/rkiros/storyteller/caption_style.npy'
paths['posbias'] = '/ais/gobi3/u/rkiros/storyteller/romance_style.npy'
def init(path):
global paths
# skip-thoughts
paths['skmodels'] = '{}/skip-thoughts/'.format(path)
paths['sktables'] = '{}/skip-thoughts/'.format(path)
# decoder
paths['decmodel'] = '{}/romance.npz'.format(path)
paths['dictionary'] = '{}/romance_dictionary.pkl'.format(path)
# Image-sentence embedding
paths['vsemodel'] = '{}/coco_embedding.npz'.format(path)
# VGG-19 convnet
paths['vgg'] = '{}/vgg19.pkl'.format(path)
paths['pycaffe'] = '/usr/local/caffe/python'
paths['vgg_proto_caffe'] = '{}/VGG_ILSVRC_19_layers_deploy.prototxt'.format(path)
paths['vgg_model_caffe'] = '{}/VGG_ILSVRC_19_layers.caffemodel'.format(path)
# COCO training captions
paths['captions'] = '{}/coco_train_caps.txt'.format(path)
# Biases
paths['negbias'] = '{}/caption_style.npy'.format(path)
paths['posbias'] = '{}/romance_style.npy'.format(path)