What is the difference between formatted and unformatted dlarrays?
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Mirko Job
el 25 de Mzo. de 2020
Editada: Sai Bhargav Avula
el 25 de Mzo. de 2020
I am trying to implement a custom deeplearning training loop and i noticed that starting from:
dlY1; % Unformatted dlarray 175x1x53696
dlY2=dlarray(dlY1,'CBT') % Formatted version of dlY1
The functions:
res1=lstm(dlY1,H0,C0,Weights,RecurrentWeights,parameters.LSTM.Bias,'DataFormat','CBT');
res2=lstm(dlY2,H0,C0,Weights,RecurrentWeights,parameters.LSTM.Bias);
Give two different results:
res1; %53696x3 dlarray
res2; %3x1x53696 dlarray
Can someone explain this? I was expecting the same values as results
0 comentarios
Respuesta aceptada
Sai Bhargav Avula
el 25 de Mzo. de 2020
Editada: Sai Bhargav Avula
el 25 de Mzo. de 2020
Hi, By having formatted dlarray enforces the order of labels 'SCBTU'. This enforcement eliminates ambiguous semantics in operations, which implicitly match labels between inputs. dlarray also enforces that the labels 'C', 'B', and 'T' can each appear at most once. The functions that use these labels accept at most one dimension for each label.
Here in your case the value of the results are same, but their format is different as formatted dlarray enforce the format constraints, where as unformatted dlarray does not enforce any constraints
Hope this helps!
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Image Data Workflows en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!