from_tensor_slices: Create Tensor-Like Slices from a Data Frame or Matrix

View source: R/aided_chatgpt.R

from_tensor_slicesR Documentation

Create Tensor-Like Slices from a Data Frame or Matrix

Description

This function converts a data frame or matrix into row-wise slices, similar to TensorFlow's 'from_tensor_slices()'.

Usage

from_tensor_slices(data)

Arguments

data

A data frame or matrix to be converted into slices.

Value

A list of slices, each corresponding to a row of the input data.

Examples

df <- data.frame(A = 1:3, B = c("x", "y", "z"))
from_tensor_slices(df)


quickcode documentation built on April 11, 2025, 5:49 p.m.