Adversarial Learning for a regression problem
조회 수: 3 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
답변 (1개)
Ranjeet
2023년 4월 14일
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.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!