Struct tfrecord::dataset::DatasetInit[][src]

pub struct DatasetInit {
    pub check_integrity: bool,
    pub max_open_files: Option<NonZeroUsize>,
    pub max_workers: Option<NonZeroUsize>,
}

The dataset initializer.

Fields

check_integrity: bool

Verify the checksum or not.

max_open_files: Option<NonZeroUsize>

Maximum number of open files.

Limit the number of open files if it is Some(_) It has no limit if it is None.

max_workers: Option<NonZeroUsize>

Maximum number of concurrent workers.

If it is None, it defaults to num_cpus::get.

Implementations

impl DatasetInit[src]

pub async fn from_prefix(self, prefix: &str) -> Result<Dataset, Error>[src]

Open TFRecord files by a path prefix.

If the path ends with “/”, it searchs for all files under the directory. Otherwise, it lists the files with the path prefix. The enumerated paths will be sorted in alphabetical order.

pub async fn from_paths<P>(self, paths: &[P]) -> Result<Dataset, Error> where
    P: AsRef<Path>, 
[src]

Open TFRecord files by a set of path.

It assumes every path is a TFRecord file, otherwise it returns error. The order of the paths affects the order of record indexes..

Trait Implementations

impl Clone for DatasetInit[src]

impl Debug for DatasetInit[src]

impl Default for DatasetInit[src]

impl Eq for DatasetInit[src]

impl Hash for DatasetInit[src]

impl PartialEq<DatasetInit> for DatasetInit[src]

impl StructuralEq for DatasetInit[src]

impl StructuralPartialEq for DatasetInit[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,