-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpqivf_large.go
More file actions
36 lines (29 loc) · 757 Bytes
/
Copy pathpqivf_large.go
File metadata and controls
36 lines (29 loc) · 757 Bytes
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
//go:build ignore
// +build ignore
package main
import (
"os"
"github.com/habedi/hann/core"
"github.com/habedi/hann/example"
"github.com/habedi/hann/pqivf"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
)
func main() {
// Set the logger to output to the console.
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr})
// Using PQIVF index with GIST dataset
PQIVFIndexGIST()
}
func PQIVFIndexGIST() {
factory := func() core.Index {
dimension := 960
coarseK := 16
numSubquantizers := 8
pqK := 256
kMeansIters := 25
return pqivf.NewPQIVFIndex(dimension, coarseK, numSubquantizers, pqK, kMeansIters)
}
example.RunDataset(factory, "gist-960-euclidean",
"example/data/nearest-neighbors-datasets-large", 100, 5, 5)
}