How to input 2D array data for Deep learing toolbox model, not image file

조회 수: 3 (최근 30일)
Yongwon Jang
Yongwon Jang 2023년 7월 20일
편집: Yongwon Jang 2023년 7월 28일
I want to perform classification using 2D data as input in MATLAB using the Deep Learning Toolbox.
I have 2D-1ch and 2D-3ch data, and I want to know how to input this data into the Deep Learning Toolbox.
Currently, the data is in CSV format, but I can convert it into a suitable 2D array.
However, when I try to input the data in the imds format like the toolbox examples (imdsTrain, imdsValidation), I encounter an error when using @readDatastoreImage since it cannot read CSV files.
  1. How can I read the input data in a format suitable for the toolbox? (I get an error when executing net = trainNetwork(imdsTrain, layers, options);)
  2. I want to define layers directly and convert the data into a format that can be used with imageInputLayer to train the model using the trainNetwork function.
  3. I would appreciate it if you could provide other alternative methods to perform classification on 2D arrays.
I would appreciate specific answers. Thank you.

답변 (1개)

Matt J
Matt J 2023년 7월 20일
편집: Matt J 2023년 7월 20일
Currently, the data is in CSV format, but I can convert it into a suitable 2D array.
An imageDataStore has a ReadFcn property that you can set to enable it to read in from arbitrary file formats.
  댓글 수: 5
Matt J
Matt J 2023년 7월 27일
Well, if it allows you to move on with your life, I guess that's the important thing, but I don't think it's a real solution.
Yongwon Jang
Yongwon Jang 2023년 7월 28일
편집: Yongwon Jang 2023년 7월 28일
Thank you for your comments.
However, this solution was provided by one of the matlab staff.......
I'll try that some other time. There are a lot of other issues that need to be addressed right now...

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

카테고리

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

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by