-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlopq_model.proto
41 lines (29 loc) · 1.34 KB
/
lopq_model.proto
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
Copyright 2015, Yahoo Inc.
Licensed under the terms of the Apache License, Version 2.0. See the LICENSE file associated with the project for terms.
define a namespace for protobuffer
package com.flickr.vision.lopq;
options for how java class should be built and packaged
option java_package = com.flickr.vision.lopq;
option java_outer_classname = LOPQModelParameters;
option optimize_for = SPEED;
GENERIC TYPES
message Vector {
repeated float values = 1 [packed = true];
}
message Matrix {
repeated float values = 1 [packed = true];
repeated uint32 shape = 2;
}
LOPQ PARAMS
lopq model params
file extension .lopq
message LOPQModelParams {
optional uint32 D = 1; dimensionality of original vectors
optional uint32 V = 2; number of coarse quantizer centroids
optional uint32 M = 3; number of subvectors
optional uint32 num_subquantizers = 4; number of subquantizer clusters
repeated Matrix Cs = 5; coarse quantizer centroids - 2 of these; size V x (D2)
repeated Matrix Rs = 6; rotations - 2 V of these, each size D2 x D2
repeated Vector mus = 7; residual means - 2 V of these, each size D2
repeated Matrix subs = 8; subquantizer centroids - M of these, each size num_subquantizers x (D2))
}