Skip to content

Latest commit

 

History

History
175 lines (102 loc) · 4.88 KB

File metadata and controls

175 lines (102 loc) · 4.88 KB

@wholebuzz/fs / Exports / tfrecord

Module: tfrecord

Table of contents

Classes

Type aliases

Variables

Functions

Type aliases

Example

Ƭ Example: tensorflow.Example

Defined in: node_modules/tfrecord-stream/lib/index.d.ts:4

Variables

Example

Const Example: typeof tensorflow.Example

Defined in: node_modules/tfrecord-stream/lib/index.d.ts:3

Functions

appendTfRecord

appendTfRecord(fileSystem: FileSystem, urlText: string, record: Record<string, any>): Promise<FileStatus | null>

Appends a record to a .tfrecord file.

Parameters

Name Type
fileSystem FileSystem
urlText string
record Record<string, any>

Returns: Promise<FileStatus | null>

Defined in: src/tfrecord.ts:75


createBinaryRecordReader

createBinaryRecordReader(fileSystem: FileSystem, url: string): Promise<RecordReader>

Creates a .tfrecord file reader using arbitrary buffers instead of protobuf.

Parameters

Name Type Description
fileSystem FileSystem -
url string The URL of the file.tfbinary to read records from.

Returns: Promise<RecordReader>

Defined in: src/tfrecord.ts:15


createBinaryRecordWriter

createBinaryRecordWriter(fileSystem: FileSystem, url: string): Promise<RecordWriter>

Creates a .tfrecord file writer using arbitrary buffers instead of protobuf.

Parameters

Name Type Description
fileSystem FileSystem -
url string The URL of the file.tfbinary to read records from.

Returns: Promise<RecordWriter>

Defined in: src/tfrecord.ts:23


makeTfExample

makeTfExample(record: Record<string, any>, floatSuffix?: string): Example

Creates a TF Example from a dictionary.

Parameters

Name Type Default value Description
record Record<string, any> - The object to serialize.
floatSuffix string '_float' Key suffix indicating floating point data.

Returns: Example

Defined in: src/tfrecord.ts:114


parseTfExample

parseTfExample(example: Example): Record<string, any>

Parameters

Name Type
example Example

Returns: Record<string, any>

Defined in: src/tfrecord.ts:91


pipeTfRecordFormatter

pipeTfRecordFormatter(stream: WritableStreamTree, format?: (x: Record<string, any>) => Example): Promise<WritableStreamTree>

Create tfrecord writer stream.

Parameters

Name Type
stream WritableStreamTree
format (x: Record<string, any>) => Example

Returns: Promise<WritableStreamTree>

Defined in: src/tfrecord.ts:53


pipeTfRecordParser

pipeTfRecordParser(stream: ReadableStreamTree, parse?: (x: Example) => Record<string, any>): Promise<ReadableStreamTree>

Reads records from .tfrecord file.

Parameters

Name Type Description
stream ReadableStreamTree Readable stream of the file.tfrecord to read records from.
parse (x: Example) => Record<string, any> -

Returns: Promise<ReadableStreamTree>

Defined in: src/tfrecord.ts:31