Repository navigation
Expand file tree
/
Copy pathmnist.ts
More file actions
54 lines (52 loc) · 2.54 KB
/
Copy pathmnist.ts
File metadata and controls
54 lines (52 loc) · 2.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import type { TaskProvider } from "#task/index";
import { cards } from "#models/index";
export const mnist: TaskProvider<"image", "decentralized"> = {
getTask() {
return Promise.resolve({
id: "mnist",
dataType: "image",
displayInformation: {
title: "Handwritten Digit Recognition",
summary: {
preview:
"The MNIST handwritten digit classification problem is a classic dataset used in computer vision and deep learning. The objective is to classify handwritten digits from 28x28 pixel images.",
overview:
"Download the classic MNIST dataset of hand-written numbers at https://www.kaggle.com/scolianni/mnistasjpg . You can also find a sample dataset at the next step.",
},
model:
"The model is a simple Convolutional Neural Network composed of three convolutional layers with ReLU activations and max pooling layers, followed by two fully connected layers. The data preprocessing simply normalizes values between 0 and 1. The neural network is optimized via RMSProp and a categorical cross-entropy loss.",
dataFormatInformation:
"This model is trained on images corresponding to digits 0 to 9. You can connect your own images of each digit in the box corresponding to its label. The model takes images of size 28x28 as input.",
dataExample:
"http://storage.googleapis.com/deai-313515.appspot.com/example_training_data/9-mnist-example.png",
sampleDataset: {
link: "https://storage.googleapis.com/deai-313515.appspot.com/MNIST_samples.tar.gz",
instructions:
'Opening the link should start downloading a zip file which you can unzip. You can connect the data with the CSV option below using the CSV file named "mnist_labels.csv". After selecting in the CSV file, you will be able to connect the data under in the "images" folder.',
},
},
trainingInformation: {
epochs: 20,
roundDuration: 2,
validationSplit: 0.2,
batchSize: 64,
IMAGE_H: 28,
IMAGE_W: 28,
LABEL_LIST: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
scheme: "decentralized",
aggregationStrategy: "byzantine",
aggregationParams: {
clippingRadius: 10,
maxIterations: 1,
beta: 0.9,
},
minNbOfParticipants: 4,
tensorBackend: "tfjs",
maxConnectionRetry: 3,
maxPeerConnectionTime: 60_000,
maxModelSyncTime: 30_000,
},
});
},
modelCard: cards.MNISTClassifier,
};