tf.keras.utils.HDF5Matrix
Representation of HDF5 dataset to be used instead of a Numpy array.
tf.keras.utils.HDF5Matrix(
datapath, dataset, start=0, end=None, normalizer=None
)
THIS CLASS IS DEPRECATED.
Training with HDF5Matrix may not be optimized for performance, and might
not work with every distribution strategy.
We recommend using https://github.com/tensorflow/io to load your
HDF5 data into a tf.data Dataset and passing that dataset to Keras.
Arguments |
datapath
|
string, path to a HDF5 file
|
dataset
|
string, name of the HDF5 dataset in the file specified
in datapath
|
start
|
int, start of desired slice of the specified dataset
|
end
|
int, end of desired slice of the specified dataset
|
normalizer
|
function to be called on data when retrieved
|
Raises |
ImportError if HDF5 & h5py are not installed
|
Attributes |
dtype
|
Gets the datatype of the dataset.
|
ndim
|
Gets the number of dimensions (rank) of the dataset.
|
shape
|
Gets a numpy-style shape tuple giving the dataset dimensions.
|
size
|
Gets the total dataset size (number of elements).
|
Methods
__getitem__
View source
__getitem__(
key
)
__len__
View source
__len__()
Class Variables
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[]]