@wholebuzz/fs / Exports / tfrecord
- appendTfRecord
- createBinaryRecordReader
- createBinaryRecordWriter
- makeTfExample
- parseTfExample
- pipeTfRecordFormatter
- pipeTfRecordParser
Ƭ Example: tensorflow.Example
Defined in: node_modules/tfrecord-stream/lib/index.d.ts:4
• Const Example: typeof tensorflow.Example
Defined in: node_modules/tfrecord-stream/lib/index.d.ts:3
▸ appendTfRecord(fileSystem: FileSystem, urlText: string, record: Record<string, any>): Promise<FileStatus | null>
Appends a record to a .tfrecord file.
| Name | Type |
|---|---|
fileSystem |
FileSystem |
urlText |
string |
record |
Record<string, any> |
Returns: Promise<FileStatus | null>
Defined in: src/tfrecord.ts:75
▸ createBinaryRecordReader(fileSystem: FileSystem, url: string): Promise<RecordReader>
Creates a .tfrecord file reader using arbitrary buffers instead of protobuf.
| 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(fileSystem: FileSystem, url: string): Promise<RecordWriter>
Creates a .tfrecord file writer using arbitrary buffers instead of protobuf.
| 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(record: Record<string, any>, floatSuffix?: string): Example
Creates a TF Example from a dictionary.
| 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(example: Example): Record<string, any>
| Name | Type |
|---|---|
example |
Example |
Returns: Record<string, any>
Defined in: src/tfrecord.ts:91
▸ pipeTfRecordFormatter(stream: WritableStreamTree, format?: (x: Record<string, any>) => Example): Promise<WritableStreamTree>
Create tfrecord writer stream.
| Name | Type |
|---|---|
stream |
WritableStreamTree |
format |
(x: Record<string, any>) => Example |
Returns: Promise<WritableStreamTree>
Defined in: src/tfrecord.ts:53
▸ pipeTfRecordParser(stream: ReadableStreamTree, parse?: (x: Example) => Record<string, any>): Promise<ReadableStreamTree>
Reads records from .tfrecord file.
| 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