MapDataset
Stay organized with collections
Save and categorize content based on your preferences.
Inherited Methods
From class
org.tensorflow.framework.data.Dataset
final
Dataset
|
batch(long batchSize, boolean dropLastBatch)
Groups elements of this dataset into batches.
|
final
Dataset
|
batch(long batchSize)
Groups elements of this dataset into batches.
|
static
Dataset
|
fromTensorSlices(Ops tf, List< Operand<?>> tensors, List<Class<? extends TType>> outputTypes)
Creates an in-memory `Dataset` whose elements are slices of the given tensors.
|
Ops
|
|
List<Shape>
|
|
List<Class<? extends TType>>
|
getOutputTypes()
Get a list of output types for each component of this dataset.
|
Operand<?>
|
getVariant()
Get the variant tensor representing this dataset.
|
Iterator<List<Operand<?>>>
|
iterator()
Creates an iterator which iterates through all batches of this Dataset in an eager fashion.
|
DatasetIterator
|
|
DatasetIterator
|
makeOneShotIterator()
Creates a `DatasetIterator` that can be used to iterate over elements of this dataset.
|
Dataset
|
map(Function<List< Operand<?>>, List< Operand<?>>> mapper)
Returns a new Dataset which maps a function over all elements returned by this dataset.
|
Dataset
|
mapAllComponents(Function< Operand<?>, Operand<?>> mapper)
Returns a new Dataset which maps a function across all elements from this dataset, on all
components of each element.
|
Dataset
|
mapOneComponent(int index, Function< Operand<?>, Operand<?>> mapper)
Returns a new Dataset which maps a function across all elements from this dataset, on a single
component of each element.
|
final
Dataset
|
skip(long count)
Returns a new `Dataset` which skips `count` initial elements from this dataset
|
final
Dataset
|
take(long count)
Returns a new `Dataset` with only the first `count` elements from this dataset.
|
static
Dataset
|
textLineDataset(Ops tf, String filename, String compressionType, long bufferSize)
|
static
Dataset
|
tfRecordDataset(Ops tf, String filename, String compressionType, long bufferSize)
|
String
|
|
From class
java.lang.Object
boolean
|
equals(Object arg0)
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
From interface
java.lang.Iterable
abstract
void
|
forEach(Consumer<? super T> arg0)
|
abstract
Iterator<List<Operand<?>>>
|
iterator()
|
abstract
Spliterator<List<Operand<?>>>
|
spliterator()
|
Public Methods
public
DatasetIterator
makeInitializeableIterator
()
Creates a `DatasetIterator` that can be used to iterate over elements of this dataset.
This iterator will have to be initialized with a call to `iterator.makeInitializer(Dataset)`
before elements can be retreived in a loop.
Returns
- A new `DatasetIterator` based on this dataset's structure.
Creates a `DatasetIterator` that can be used to iterate over elements of this dataset. Using
`makeOneShotIterator` ensures that the iterator is automatically initialized on this dataset.
skips In graph mode, the initializer op will be added to the Graph's intitializer list, which
must be run via `tf.init()`:
Ex:
try (Session session = new Session(graph) {
// Immediately run initializers
session.run(tf.init());
}
In eager mode, the initializer will be run automatically as a result of this call.
Returns
- A new `DatasetIterator` based on this dataset's structure.
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 2021-11-29 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2021-11-29 UTC."],[],[]]