Spaces:
Running
Running
Download frontends/react/src/mnist.d.ts from elvis-hf/cnn_visualizer: direct link, hf CLI and curl.
- Browser
- Download file 896 Bytes
-
https://huggingface.co/spaces/elvis-hf/cnn_visualizer/resolve/main/frontends/react/src/mnist.d.ts
- Command line
-
hf download hf://spaces/elvis-hf/cnn_visualizer/frontends/react/src/mnist.d.ts
-
curl -L -o mnist.d.ts https://huggingface.co/spaces/elvis-hf/cnn_visualizer/resolve/main/frontends/react/src/mnist.d.ts
896 Bytes
| import * as tf from "@tensorflow/tfjs"; | |
| export interface BatchData { | |
| xs: tf.Tensor2D; | |
| labels: tf.Tensor2D; | |
| } | |
| export interface TestSample { | |
| xs: tf.Tensor2D; | |
| labels: tf.Tensor2D; | |
| } | |
| export class MnistData { | |
| shuffledTrainIndex: number; | |
| shuffledTestIndex: number; | |
| numClasses: number; | |
| numInputChannels: number; | |
| trainSize: number; | |
| testSize: number; | |
| imageSize: number; | |
| datasetImages: Float32Array; | |
| datasetLabels: Uint8Array; | |
| trainIndices: Uint32Array; | |
| testIndices: Uint32Array; | |
| trainImages: Float32Array; | |
| testImages: Float32Array; | |
| trainLabels: Uint8Array; | |
| testLabels: Uint8Array; | |
| load(): Promise<void>; | |
| nextTrainBatch(batchSize: number): BatchData; | |
| nextTestBatch(batchSize: number): BatchData; | |
| nextBatch( | |
| batchSize: number, | |
| data: [Float32Array, Uint8Array], | |
| index: () => number, | |
| ): BatchData; | |
| getTestSample(index: number): TestSample; | |
| } | |