Effacer les filtres
Effacer les filtres

Adversarial Learning for a regression problem

3 vues (au cours des 30 derniers jours)
Daniele Minotti
Daniele Minotti le 4 Avr 2023
Hi everyone!
I have studied the example on Mathworks "Train Image Classification Network Robust to Adversarial Examples". In my specific case, I'm facing not a classification problem, but a regression problem in which every image of the dataset is associated to a numeric value. So basically I am wondering how to solve this problem, how to apply adversarial learning to my regression problem. I have created the XTrain,the YTrain and the regression CNN for my dataset, but of course, since it's not a classification problem, I have no classes. Any advice to perform A.L.?
Thank you very much.

Réponses (1)

Ranjeet
Ranjeet le 14 Avr 2023
Hi Daniele,
From your description, I understand that you are trying to achieve Image regression. In the example script that you pointed to “Train Image classification network robust to adversarial examples”, I suggest you to modify the CNN network by removing Softmax layer and add a FullyConnectedLayer with n inputs and single output so that you get a number as output from your network.
Also, depending upon the range on training labels (the numbers associated with an image), if the output is expected to be between 0 and 1, you may use sigmoid function as final layer. If output is expected to be between 0 and any number N, you may use max(0, N) which is ReLu.
Also, do refer the following answer to have training labels as categorical input-
I assume that you already have adversarial examples in your dataset, the trained network should be robust to adversarial examples.

Catégories

En savoir plus sur Image Data Workflows dans Help Center et File Exchange

Produits


Version

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by