اگه از تولباکس deeplearning متلب استفاده میکنین میتونین همچین کدی استفاده کنین
featureLayer='fc8'
trainingFeatures1 = activations(convnet, trainingSet, featureLayer )
featureLayer='fc7'
trainingFeatures2 = activations(convnet, trainingSet, featureLayer )
trainingfeature= [trainingfeature1;trainingfeature2]