17 using namespace armcomputetensorutils;
26 const arm_compute::TensorInfo aclInput = BuildArmComputeTensorInfo(input);
27 const arm_compute::TensorInfo aclOutput = BuildArmComputeTensorInfo(output);
28 arm_compute::TensorInfo aclWeights = BuildArmComputeTensorInfo(weights);
29 aclWeights.set_are_values_constant(weights.
IsConstant());
31 arm_compute::TensorInfo aclBiases;
32 arm_compute::TensorInfo* optionalAclBiases =
nullptr;
36 aclBiases = BuildArmComputeTensorInfo(biases.
value());
37 aclBiases.set_are_values_constant(biases.
value().IsConstant());
38 optionalAclBiases = &aclBiases;
41 const arm_compute::FullyConnectedLayerInfo fullyConnectedLayerInfo =
44 return arm_compute::CLFullyConnectedLayer::validate(&aclInput,
48 fullyConnectedLayerInfo);
54 std::shared_ptr<arm_compute::MemoryManagerOnDemand>& memoryManager,
55 const arm_compute::CLCompileContext& clCompileContext)
60 arm_compute::ICLTensor& input = PolymorphicDowncast<IClTensorHandle*>(
m_Data.
m_Inputs[0])->GetTensor();
61 arm_compute::ICLTensor& output = PolymorphicDowncast<IClTensorHandle*>(
m_Data.
m_Outputs[0])->GetTensor();
62 arm_compute::ICLTensor& weights = PolymorphicDowncast<IClTensorHandle*>(
m_Data.
m_Inputs[1])->GetTensor();
64 weights.info()->set_are_values_constant(
info.m_InputTensorInfos[1].IsConstant());
66 arm_compute::ICLTensor* bias =
nullptr;
69 bias = &PolymorphicDowncast<IClTensorHandle*>(
m_Data.
m_Inputs[2])->GetTensor();
70 bias->info()->set_are_values_constant(
info.m_InputTensorInfos[2].IsConstant());
75 arm_compute::FullyConnectedLayerInfo fc_info =
81 m_FullyConnectedLayer.configure(clCompileContext,