It will allow little endianness in `nnpackage-run`.
`hdf5` internally convert endianness if necessay.
All we need is to allow little endian from if-condition.
Signed-off-by: Sanggyu Lee <sg5.lee@samsung.com>
// check type
hid_t type = H5Dget_type(dset_id);
- if (!H5Tequal(type, H5T_IEEE_F32BE))
+ if (!H5Tequal(type, H5T_IEEE_F32BE) && !H5Tequal(type, H5T_IEEE_F32LE))
{
std::cerr << "h5 input has non-float32 type. nnpkg_run supports float32 only." << std::endl;
H5Dclose(dset_id);
H5Fclose(file_id);
exit(-1);
}
+
// allocate memory for data
auto sz = num_elems(&ti);
inputs[i].resize(sz);