19 {
21 {
22
23
25 {
27 }
28 }
30 {
31
32 Layer& connectedLayer = layer.GetInputSlots()[0].GetConnectedOutputSlot()->GetOwningLayer();
34 {
35
36
38 {
39
40
42 }
43 }
44 }
46 {
47
48
49 for (auto&& input = layer.BeginInputSlots(); input != layer.EndInputSlots(); ++input)
50 {
51
52
53 Layer& base = input->GetConnectedOutputSlot()->GetOwningLayer();
55 {
56 TensorInfo convertInfo = input->GetConnection()->GetTensorInfo();
58 {
60 input->GetConnection()->SetTensorInfo(convertInfo);
61 }
62 }
63 }
64
65
67 {
68
69 for (auto&& output = layer.BeginOutputSlots(); output != layer.EndOutputSlots(); ++output)
70 {
71 TensorInfo convertInfo = output->GetTensorInfo();
73 {
75 output->SetTensorInfo(convertInfo);
76 }
77 }
78 }
79 }
80 }
std::vector< ConvertFp32ToFp16Layer * > InsertConvertFp32ToFp16LayersAfter(Graph &graph, Layer &layer)
std::vector< ConvertFp16ToFp32Layer * > InsertConvertFp16ToFp32LayersBefore(Graph &graph, Layer &layer, bool expectCorrectInputType)