Skip to content

Commit

Permalink
📝 Add commens about HDF5 datatype
Browse files Browse the repository at this point in the history
  • Loading branch information
rinx committed Jan 25, 2021
1 parent 0fdcb0c commit 068fb26
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions example/client/agent/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions example/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 068fb26

Please sign in to comment.