aboutsummaryrefslogtreecommitdiff
path: root/src/graph/nodes/FullyConnectedLayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/graph/nodes/FullyConnectedLayer.cpp')
-rw-r--r--src/graph/nodes/FullyConnectedLayer.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/graph/nodes/FullyConnectedLayer.cpp b/src/graph/nodes/FullyConnectedLayer.cpp
index f41e1a3c22..6ea0292505 100644
--- a/src/graph/nodes/FullyConnectedLayer.cpp
+++ b/src/graph/nodes/FullyConnectedLayer.cpp
@@ -40,6 +40,7 @@ FullyConnectedLayerNode::FullyConnectedLayerNode(unsigned int num_outputs, Quant
TensorDescriptor FullyConnectedLayerNode::compute_weights_descriptor(const TensorDescriptor &input_descriptor,
unsigned int num_outputs,
+ FullyConnectedLayerInfo fc_info,
QuantizationInfo weights_quant_info)
{
unsigned int num_weights = 1;
@@ -57,6 +58,12 @@ TensorDescriptor FullyConnectedLayerNode::compute_weights_descriptor(const Tenso
TensorDescriptor weights_descriptor = input_descriptor;
weights_descriptor.shape = TensorShape(num_weights, num_outputs);
+ // If weights are tranposed, use tranposed shape
+ if(!fc_info.transpose_weights)
+ {
+ weights_descriptor.shape = TensorShape(num_outputs, num_weights);
+ }
+
// Set quantization info if present
if(!weights_quant_info.empty())
{