Is it possible to reshape a vector into 3D matrix
13 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have a conv layer output which is 13x13x256. I have gotten the output feature of this layer using activations function in matlab as:
Feature = activations (net, trainingset, 15);
The feature is a vector equal to 43264. I need to re-enter this vector to the next layer which has an input size 13x13x256.
So how could I do that, should I reshape the feature vector to 13x13x256 matrix? how I do that?
Help me and thank you
0 commentaires
Réponses (1)
Stephen23
le 17 Nov 2017
Modifié(e) : Stephen23
le 17 Nov 2017
>> V = rand(1,43264);
>> A = reshape(V,13,13,256);
3 commentaires
Stephen23
le 17 Nov 2017
Modifié(e) : Stephen23
le 17 Nov 2017
@Mammo Image: Whatever the number of elements the input array has, the reshaped array must contain exactly the same number of elements. So if you provide this:
V = rand(1,43264);
W = [V,V];
then you can do any of these:
A = reshape(W,2*13,13,256);
A = reshape(W,13,2*13,256);
A = reshape(W,13,13,2*256);
and no doubt many other sizes as well. Which one you want depends on your algorithm, which you have explained absolutely nothing about.
Voir également
Catégories
En savoir plus sur Image Data Workflows dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!