DiscriminatorWithPreprocessing.emadl 628 Bytes
Newer Older
1 2 3 4
/* (c) https://github.com/MontiCore/monticore */
package defaultGANPreprocessing;

component DiscriminatorWithPreprocessing{
Julian Dierkes's avatar
Julian Dierkes committed
5
    ports in Q(-1:1)^{3, 32, 32} data,
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
         out Q(-oo:oo)^{1} dis;

    implementation CNN {

		data ->
        Convolution(kernel=(4,4),channels=64, stride=(2,2)) ->
		LeakyRelu(alpha=0.2) ->
        Convolution(kernel=(4,4),channels=128, stride=(2,2)) ->
		BatchNorm() ->
		LeakyRelu(alpha=0.2) ->
        Convolution(kernel=(4,4),channels=256, stride=(2,2)) ->
		BatchNorm() ->
		LeakyRelu(alpha=0.2) ->
        Convolution(kernel=(4,4),channels=1, stride=(1,1)) ->
		Sigmoid() ->
		dis;
    }
}