17 for (
unsigned int i = 0; i < (numDimensions-1); ++i)
25 unsigned int w = in.
GetShape()[numDimensions-1];
35 template<
typename SlotListType>
38 std::vector<SlotListType>& inputLayersSlotLists,
39 std::vector<SlotListType>& outputLayersSlotLists)
42 inputLayersSlotLists.push_back({0, 1});
43 inputLayersSlotLists.push_back({1});
44 inputLayersSlotLists.push_back({1});
47 inputLayersSlotLists.push_back({});
53 outputLayersSlotLists.push_back({0});
57 outputLayersSlotLists.push_back({});
59 outputLayersSlotLists.push_back({});
62 outputLayersSlotLists.push_back({});
63 outputLayersSlotLists.push_back({0});
67 outputLayersSlotLists.push_back({0});
75 for (
unsigned int layerIdx = 0; layerIdx< 4; ++layerIdx)
77 if (! layerList[layerIdx])
82 fusedName += layerList[layerIdx]->
GetNameStr();
86 template<
typename Type>
88 unsigned int& numInputs,
89 unsigned int& numOutputs,
90 std::vector<TensorInfo>& inputInfos,
91 std::vector<TensorInfo>& outputInfos,
103 fuseReLu = (layerList[3] !=
nullptr);
106 activationDescriptor = &PolymorphicDowncast<ActivationLayer *>(layerList[3])->GetParameters();
116 unsigned int layerIdx = 0;
117 unsigned int inputSlotCount = 0;
118 for (layerIdx = 0; layerIdx < 3; ++layerIdx)
120 for (
unsigned int slotIdx = 0; slotIdx < layerList[layerIdx]->GetNumInputSlots(); ++slotIdx)
122 InputSlot* inputSlot = &layerList[layerIdx]->GetInputSlot(slotIdx);
138 if (numInputs == 2 || numInputs == 3)
145 if (previousLayerSlot)
155 = std::make_unique<ScopedTensorHandle>(
162 inputInfos.push_back(inputSlotInfo);
172 bool validInputCount = (inputSlotCount == 6) && (inputInfos.size() == 4);
173 if (! validInputCount)
178 const unsigned int maxIdx = (fuseReLu) ? 4 : 3;
179 for (layerIdx = 0; layerIdx < maxIdx; ++layerIdx)
181 for (
unsigned int slotIdx = 0; slotIdx < layerList[layerIdx]->GetNumOutputSlots(); ++slotIdx)
183 OutputSlot* outputSlot = &layerList[layerIdx]->GetOutputSlot(slotIdx);
185 for (
unsigned int connectionIdx = 0; connectionIdx < outputSlot->
GetNumConnections(); ++connectionIdx)
188 if (layerIdx < (maxIdx-1))
196 else if (layerList[layerIdx] !=
nullptr)
206 bool validOutputCount = (outputInfos.size() > 0);
207 if (! validOutputCount)