make_libsvm_dataset: Create a Dataset from LibSVM files.

Description Usage Arguments

View source: R/libsvm_dataset.R

Description

Create a Dataset from LibSVM files.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
make_libsvm_dataset(
  file_names,
  num_features,
  dtype = NULL,
  label_dtype = NULL,
  batch_size = 1,
  compression_type = "",
  buffer_size = NULL,
  num_parallel_parser_calls = NULL,
  drop_final_batch = FALSE,
  prefetch_buffer_size = 0
)

Arguments

file_names

A tf.string tensor containing one or more filenames.

num_features

The number of features.

dtype

The type of the output feature tensor. Default to tf.float32.

label_dtype

The type of the output label tensor. Default to tf.int64.

batch_size

An integer representing the number of records to combine in a single batch, default 1.

compression_type

A tf.string scalar evaluating to one of "" (no compression), "ZLIB", or "GZIP".

buffer_size

A tf.int64 scalar denoting the number of bytes to buffer. A value of 0 results in the default buffering values chosen based on the compression type.

num_parallel_parser_calls

Number of parallel records to parse in parallel. Defaults to an automatic selection.

drop_final_batch

Whether the last batch should be dropped in case its size is smaller than batch_size; the default behavior is not to drop the smaller batch.

prefetch_buffer_size

An integer specifying the number of feature batches to prefetch for performance improvement. Defaults to auto-tune. Set to 0 to disable prefetching.


tfio documentation built on Dec. 25, 2019, 5:06 p.m.