필터 지우기
필터 지우기

Experiment Manager Regression task

조회 수: 9 (최근 30일)
Claudia Borredon
Claudia Borredon 2020년 12월 23일
댓글: JESÚS MARÍA 2024년 2월 29일
I wanted to use the Experiment manager to train a network which takes in input an image of size 1xM and outputs 1 numerical value. My dataset is composed by N of such pairs and usually I feed the network using trainNetwork(TrainIn, TrainOut, layers, options), where TrainIn is a matrix [1 M 1 N] shaped and TrainOut is a numerical array with N elements, and it works. Also the validation set is shaped like this and I input it in trainingOptions using 'ValidationData',{VaIn,VaOut}.
I watched the "How to Set Up Your Own Deep Learning Experiments", and I thought it was enough to let the output of the function be
[ TrainIn, TrainOut, layers, output] = experimentFunction(params)
instead of just [ dataset, layers, output] = experimentFunction(params)
but when I run the Experiment Manager I get the error:
Error(s) occurred while validating the setup function: Caused by: Error using textscan
Invalid file identifier. Use fopen to generate a valid file identifier.
and this happens both if I explicit the validation set or not. I imagine that this happens because I am not using a datastore. If I manage to use a datastore for the TrainIn images, then, does it have to be a single datastore containing TrainIn and TrainOut or can I have a datastore input and an array of numbers output? If it must contain both the input and output set, how do I signal to the code which is which?
Thank you in advance.

채택된 답변

Anshika Chaurasia
Anshika Chaurasia 2020년 12월 28일
Hi Claudia,
You can refer to the following example:
In the above example following function is used:
function [TrainIn,TrainOut,layers,options] = experimentFunction(params)
Moreover, I wasn't able to reproduce your error at my end as I don't have the datasets and script which you have used.
  댓글 수: 1
Claudia Borredon
Claudia Borredon 2020년 12월 28일
I didn't try to run the experimentFunction on its own before using it in the Experiment Manager. I found out that the error was in the function, thank you again.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

ahmed shahin
ahmed shahin 2021년 1월 10일
please could u help me to solve this error ?
Unable to determine if experiment is for classification or regression because setup function returned invalid outputs.
  댓글 수: 1
JESÚS MARÍA
JESÚS MARÍA 2024년 2월 29일
I have that same problem. I need help too. Thank you.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Data Preprocessing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by