File size: 2,569 Bytes
ad64a41
 
 
 
 
7557692
 
 
 
ad64a41
 
 
 
7557692
 
 
 
 
 
ad64a41
 
 
7557692
 
 
 
 
 
 
 
ad64a41
 
 
7557692
 
ad64a41
7557692
ad64a41
7557692
 
 
 
 
 
ad64a41
 
 
7557692
 
 
 
 
 
 
 
 
 
 
 
 
 
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
55
56
57
58
59
60
61
62
---
library_name: keras
tags:
- semi-supervised
- image classification
- domain adaption
datasets:
- MNIST
- SVHN
---

## Model description

This is an image classification model based on a [WideResNet-2-28](https://arxiv.org/abs/1605.07146v4), trained using the [AdaMatch](https://arxiv.org/abs/2106.04732) method by Berthelot et al. 

 The training was based on the example [Semi-supervision and domain adaptation with AdaMatch]('https://keras.io/examples/vision/adamatch/') on keras.io by [Sayak Paul](https://twitter.com/RisingSayak). 

The main difference to the training in the keras.io example is that here I increased the number of Epochs to 30, for a better target dataset performance.


## Intended uses & limitations

AdaMatch attempts to combine *semi-supervised learning*, i.e. learning with a partially labelled dataset and *unsupersived domain adaption*, i.e. adapting a model to a different domain dataset without any labels.

So it actually performs **semi-supervised domain adaptation (SSDA)**.

The model is inteded to show that AdaMatch is able to carry out SSDA, with a accuracy on the target domain (SVHN) that is exceeding or competitive with other methods.

### Limitations
The model was trained on MNIST as source and SVHN as target dataset. Thus, the classification performance on MNIST is very good (98.46%), while the accuracy on SVHN is "only" at 26.51%. Compared to the training of the same architecture without AdaMatch, this still is about 17% better

## Training and evaluation data

### Training Data
The model was trained using the [MNIST](https://huggingface.co/datasets/mnist) (as source domain) and [SVHN cropped](http://ufldl.stanford.edu/housenumbers/) (as target domain) datasets. For training the images were used at a resolution of (32,32,3).

Augmented versions of the source and target data were created in two versions - weakly and strongly augmented, as written in the original paper.

### Training Procedure
This image from the original paper shows the workflow of AdaMatch:
![](https://i.imgur.com/1QsEm2M.png)
For more information, refer to the [paper](https://arxiv.org/abs/2106.04732) or the original example at [keras.io]('https://keras.io/examples/vision/adamatch/').

### Hyperparameters

The following hyperparameters were used during training:

- Epochs: 30
- Source Batch Size: 64
- Target Batch Size: 3 * 64
- Learning Rate: 0.03
- Weight Decay: 0.0005
- Network Depth: 28
- Network Width Multiplier = 2

## Evaluation

Accuracy on **source** test set: **98.46%**

Accuracy on **target** test set: **26.51%**