///<summary>Выполняет прямой проход через декодирующую нейросеть.</summary> ///<param name="input">Входные данные.</param> public Tensor Decode(Tensor Content, Tensor[] Styles) { var Temp = Layers.StyleDecorator(Content, Styles[3]); Temp = Layers.Conv2D3x3(Temp, this.Data.Conv4_1_Weights, this.Data.Conv4_1_Biases); if (this.Step != null) { this.Step(1f / 22f * 100f); } Temp = Layers.ReLU(Temp); if (this.Step != null) { this.Step(1f / 22f * 100f); } Temp = Layers.Upsample2D(Temp); if (this.Step != null) { this.Step(1f / 22f * 100f); } Temp = Layers.Conv2D3x3(Temp, this.Data.Conv3_4_Weights, this.Data.Conv3_4_Biases); if (this.Step != null) { this.Step(1f / 22f * 100f); } Temp = Layers.ReLU(Temp); if (this.Step != null) { this.Step(1f / 22f * 100f); } Temp = Layers.Conv2D3x3(Temp, this.Data.Conv3_3_Weights, this.Data.Conv3_3_Biases); if (this.Step != null) { this.Step(1f / 22f * 100f); } Temp = Layers.ReLU(Temp); if (this.Step != null) { this.Step(1f / 22f * 100f); } Temp = Layers.Conv2D3x3(Temp, this.Data.Conv3_2_Weights, this.Data.Conv3_2_Biases); if (this.Step != null) { this.Step(1f / 22f * 100f); } Temp = Layers.ReLU(Temp); if (this.Step != null) { this.Step(1f / 22f * 100f); } Temp = Layers.AdaIN(Temp, Styles[2]); Temp = Layers.Conv2D3x3(Temp, this.Data.Conv3_1_Weights, this.Data.Conv3_1_Biases); if (this.Step != null) { this.Step(1f / 22f * 100f); } Temp = Layers.ReLU(Temp); if (this.Step != null) { this.Step(1f / 22f * 100f); } Temp = Layers.Upsample2D(Temp); if (this.Step != null) { this.Step(1f / 22f * 100f); } Temp = Layers.Conv2D3x3(Temp, this.Data.Conv2_2_Weights, this.Data.Conv2_2_Biases); if (this.Step != null) { this.Step(1f / 22f * 100f); } Temp = Layers.ReLU(Temp); if (this.Step != null) { this.Step(1f / 22f * 100f); } Temp = Layers.AdaIN(Temp, Styles[1]); Temp = Layers.Conv2D3x3(Temp, this.Data.Conv2_1_Weights, this.Data.Conv2_1_Biases); if (this.Step != null) { this.Step(1f / 22f * 100f); } Temp = Layers.ReLU(Temp); if (this.Step != null) { this.Step(1f / 22f * 100f); } Temp = Layers.Upsample2D(Temp); if (this.Step != null) { this.Step(1f / 22f * 100f); } Temp = Layers.Conv2D3x3(Temp, this.Data.Conv1_2_Weights, this.Data.Conv1_2_Biases); if (this.Step != null) { this.Step(1f / 22f * 100f); } Temp = Layers.ReLU(Temp); if (this.Step != null) { this.Step(1f / 22f * 100f); } Temp = Layers.AdaIN(Temp, Styles[0]); Temp = Layers.Conv2D3x3(Temp, this.Data.Conv1_1_Weights, this.Data.Conv1_1_Biases); if (this.Step != null) { this.Step(1f / 22f * 100f); } Temp = Layers.ReLU(Temp); if (this.Step != null) { this.Step(1f / 22f * 100f); } Temp = Layers.Conv2D7x7(Temp, this.Data.Conv_Out_Weights, this.Data.Conv_Out_Biases); if (this.Step != null) { this.Step(1f / 22f * 100f); } return(Temp); }