multidimensional array and deep learning

Hi,
I am trying to create a simple deep learning network but it 'appears' that they are not compatible with multidimensional arrays. I have a data-set of (30,30,97000) of positive example and (30,30,200000) negative examples. the names and pos/neg tags are in separate arrays. Need some direction on how to get the data into the prop format for deep learning.
Do i need to write a loop and save all of the files individually so i can build a data store afterwards? seems time inefficient...
quick mock-up example
good=rand(30,30,100); bad=rand(30,30,200);
g_label=(1:1:100); g_label(2,:)=1;
b_label=(101:1:300); b_label(2,:)=1;

 采纳的回答

I obtained help from tech support. The Deep learning tools will take a 4-dimensional array. using the permute function, I added one dimension so my data is arranged like a grayscale image - (width, height, channel, number of images).
Good=rand(30,30,100);
Good=permute(Good, [1 2 4 3]);
Size(Good)
30 30 1 100
Hope that helps someone, Jason

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Deep Learning Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by