summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/caffe/acl_operator.hpp3
-rw-r--r--src/caffe/layers/acl_inner_product_layer.cpp6
2 files changed, 7 insertions, 2 deletions
diff --git a/include/caffe/acl_operator.hpp b/include/caffe/acl_operator.hpp
index 90051054..5759f4dc 100644
--- a/include/caffe/acl_operator.hpp
+++ b/include/caffe/acl_operator.hpp
@@ -620,11 +620,12 @@ bool instantiate_op_lc(ACLOperator* acl_op,std::vector<std::unique_ptr<arm_compu
func.push_back(instantiate_op_func<arm_compute::CLLocallyConnectedLayer,arm_compute::ICLTensor,arm_compute::NELocallyConnectedLayer,arm_compute::ITensor, arm_compute::PadStrideInfo>(input, weights,biases,output,info, hint));
return true;
}
+
template <typename OperatorInfo>
bool instantiate_op_fc(ACLOperator* acl_op,std::vector<std::unique_ptr<arm_compute::IFunction>> & func,std::unique_ptr<ACLTensor> & input,std::unique_ptr<ACLTensor> & output,TargetHint hint, const OperatorInfo &info){
std::unique_ptr<ACLTensor> & weights=acl_op->weights();
std::unique_ptr<ACLTensor> & biases=acl_op->biases();
- func.push_back(instantiate_op_func<arm_compute::CLFullyConnectedLayer,arm_compute::ICLTensor,arm_compute::NEFullyConnectedLayer,arm_compute::ITensor, bool>(input, weights,biases,output,info, hint));
+ func.push_back(instantiate_op_func<arm_compute::CLFullyConnectedLayer,arm_compute::ICLTensor,arm_compute::NEFullyConnectedLayer,arm_compute::ITensor, arm_compute::FullyConnectedLayerInfo>(input, weights,biases,output,info, hint));
return true;
}
template <typename Dtype>
diff --git a/src/caffe/layers/acl_inner_product_layer.cpp b/src/caffe/layers/acl_inner_product_layer.cpp
index bb819fcc..c7cc0723 100644
--- a/src/caffe/layers/acl_inner_product_layer.cpp
+++ b/src/caffe/layers/acl_inner_product_layer.cpp
@@ -32,12 +32,16 @@ void ACLInnerProductLayer<Dtype>::SetupACLOperator(const vector<Blob<Dtype>*>& b
}else{
new_tensor(weights(),weights_shape,GetDataPtr(this,this->blobs_[0].get()));
}
+
+ arm_compute::FullyConnectedLayerInfo fc_info = arm_compute::FullyConnectedLayerInfo();
+ fc_info.transpose_weights = transpose;
+
if (this->bias_term_) {
new_tensor(biases(),biases_shape,GetDataPtr(this,this->blobs_[1].get()));
}
new_tensor(input(),input_shape,InputdataPtr(this,bottom));
new_tensor(output(),output_shape,OutputdataPtr(this,top));
- acl_configure(fc,this,transpose);
+ acl_configure(fc,this,fc_info);
}
template <typename Dtype>
void ACLInnerProductLayer<Dtype>::Reshape(const vector<Blob<Dtype>*>& bottom,