From 068fb26ac523d2dc574132daf2e3d966ef1871cb Mon Sep 17 00:00:00 2001 From: Rintaro Okamura Date: Mon, 25 Jan 2021 02:40:21 +0000 Subject: [PATCH] :memo: Add commens about HDF5 datatype --- example/client/agent/main.go | 2 ++ example/client/main.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/example/client/agent/main.go b/example/client/agent/main.go index 5b286cbe8f..b1da12e6c0 100644 --- a/example/client/agent/main.go +++ b/example/client/agent/main.go @@ -171,6 +171,8 @@ func load(path string) (ids []string, train, test [][]float32, err error) { row, dim := int(dims[0]), int(dims[1]) // Gets the stored vector. All are represented as one-dimensional arrays. + // The type of the slice depends on your dataset. + // For fashion-mnist-784-euclidean.hdf5, the datatype is float32. vec := make([]float32, sp.SimpleExtentNPoints()) if err := d.Read(&vec); err != nil { return nil, err diff --git a/example/client/main.go b/example/client/main.go index 0d0bb813a8..ccec652e8a 100644 --- a/example/client/main.go +++ b/example/client/main.go @@ -153,6 +153,8 @@ func load(path string) (ids []string, train, test [][]float32, err error) { row, dim := int(dims[0]), int(dims[1]) // Gets the stored vector. All are represented as one-dimensional arrays. + // The type of the slice depends on your dataset. + // For fashion-mnist-784-euclidean.hdf5, the datatype is float32. vec := make([]float32, sp.SimpleExtentNPoints()) if err := d.Read(&vec); err != nil { return nil, err