input_fn_builder_EF: Create an 'input_fn' closure to be passed to TPUEstimator

View source: R/extract_features.R

input_fn_builder_EFR Documentation

Create an input_fn closure to be passed to TPUEstimator

Description

Creates an input_fn closure to be passed to TPUEstimator. The output of this closure is the (modified) output of tensorflow::tf$data$Dataset$from_tensor_slices (an object of class "tensorflow.python.data.ops.dataset_ops.BatchDataset"). This function is similar to input_fn_builder from run_classifier.R. (RBERT issue #28.)

Usage

input_fn_builder_EF(features, seq_length)

Arguments

features

A list of features (objects of class InputFeatures_EF).

seq_length

Integer; the maximum length (number of tokens) of each example. (Examples should already be padded to this length by this point.)

Value

An input_fn closure to be passed to TPUEstimator.


jonathanbratt/RBERT documentation built on Jan. 26, 2023, 4:15 p.m.