-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patht_code_gen.py
More file actions
executable file
·68 lines (55 loc) · 2.03 KB
/
t_code_gen.py
File metadata and controls
executable file
·68 lines (55 loc) · 2.03 KB
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
#! /usr/bin/env python
from code_gen import *
print vec_decl('double')
print vec_decl('double_vec')
print vec_decl('uint', 'unsigned int')
print vec_decl('ulong', 'unsigned long')
print cls_decl('rh::RegionData', [], ['m_features', 'm_temp_labels']).gen_boost()
print cls_decl('VRandomForest::VTreeNode',
[['get_left', 'ext', 'reo'],
['get_right', 'ext', 'reo'],
['refill_avg_outputs', 'ext']],
['is_leaf', 'count', 'dim', 'avg_output',
['thresh', 'ro']]).gen_boost()
print vec_decl('VTreeNode')
vr= cls_decl('VRandomForest',
[],
['m_nbr_trees',
'm_max_depth',
'm_min_node_size',
'm_rdm_dim_percent',
'm_rdm_sample_percent',
'm_seeds',
'm_trees'])
print vr.gen()
print vr.gen_boost()
print vec_decl('VRandomForest')
print cls_decl('VBoostedMaxEnt',
[['get_vec_vrandomforest', 'ext'],
['wrap_train', 'ext'],
['wrap_predict', 'ext'],
'save',
'load'],
['m_step_sizes',
'm_dim'],
init_args=['double', 'double', 'double',
'int', 'VRandomForest']).gen_boost()
print cls_decl('tBox',
[],
['type', 'x1', 'y1', 'x2', 'y2', 'alpha'],
init_args=['string',
'double',
'double',
'double',
'double',
'double']).gen_boost()
print cls_decl('tGroundtruth',
[],
['box', 'truncation', 'occlusion']).gen_boost()
print cls_decl('tDetection',
[],
['box', 'thresh']).gen_boost()
print vec_decl('tGroundtruth')
print vec_decl('tDetection')
print vec_decl('tGroundtruth_vec')
print vec_decl('tDetection_vec')