public class Hdf5Archive extends Object implements Closeable
Modifier and Type | Field and Description |
---|---|
static Object |
LOCK_OBJECT
HDF5 library is not thread safe - possible to crash if multiple reads etc are performed concurrently
in multiple threads.
|
static int |
MAX_BUFFER_SIZE_BYTES |
Constructor and Description |
---|
Hdf5Archive(String archiveFilename) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
closeGroups(org.bytedeco.hdf5.Group[] groupArray) |
List<String> |
getDataSets(String... groups)
Get list of data sets from group path.
|
List<String> |
getGroups(String... groups)
Get list of groups from group path.
|
boolean |
hasAttribute(String attributeName,
String... groups)
Check whether group path contains string attribute.
|
org.bytedeco.hdf5.Group[] |
openGroups(String... groups) |
String |
readAttributeAsFixedLengthString(String attributeName,
int bufferSize)
Read string attribute from group path.
|
String |
readAttributeAsJson(String attributeName,
String... groups)
Read JSON-formatted string attribute from group path.
|
String |
readAttributeAsString(String attributeName,
String... groups)
Read string attribute from group path.
|
INDArray |
readDataSet(String datasetName,
String... groups)
Read data set as ND4J array from group path.
|
public static final int MAX_BUFFER_SIZE_BYTES
public static final Object LOCK_OBJECT
public Hdf5Archive(String archiveFilename)
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public org.bytedeco.hdf5.Group[] openGroups(String... groups)
public void closeGroups(org.bytedeco.hdf5.Group[] groupArray)
public INDArray readDataSet(String datasetName, String... groups) throws UnsupportedKerasConfigurationException
datasetName
- Name of data setgroups
- Array of zero or more ancestor groups from root to parent.UnsupportedKerasConfigurationException
- Unsupported Keras configpublic String readAttributeAsJson(String attributeName, String... groups) throws UnsupportedKerasConfigurationException
attributeName
- Name of attributegroups
- Array of zero or more ancestor groups from root to parent.UnsupportedKerasConfigurationException
- Unsupported Keras configpublic String readAttributeAsString(String attributeName, String... groups) throws UnsupportedKerasConfigurationException
attributeName
- Name of attributegroups
- Array of zero or more ancestor groups from root to parent.UnsupportedKerasConfigurationException
- Unsupported Keras configpublic boolean hasAttribute(String attributeName, String... groups)
attributeName
- Name of attributegroups
- Array of zero or more ancestor groups from root to parent.public List<String> getDataSets(String... groups)
groups
- Array of zero or more ancestor groups from root to parent.public List<String> getGroups(String... groups)
groups
- Array of zero or more ancestor groups from root to parent.public String readAttributeAsFixedLengthString(String attributeName, int bufferSize) throws UnsupportedKerasConfigurationException
attributeName
- Name of attributebufferSize
- buffer size to readUnsupportedKerasConfigurationException
- Unsupported Keras configCopyright © 2022. All rights reserved.