
digraph Test {
    z -> generator -> G_img;
    G_img -> discriminator -> D_f -> d_loss_f;
    label0 -> d_loss_f -> d_loss;

    img -> discriminator -> D_t -> d_loss_t;
    label1 -> d_loss_t -> d_loss;

    d_loss -> d_loss_t[color=red, style=dashed];
    d_loss -> d_loss_f[color=red, style=dashed];
    d_loss_t -> D_t[color=red, style=dashed];
    d_loss_f -> D_f[color=red, style=dashed];
    D_t -> discriminator[color=red, style=dashed];
    D_f -> discriminator[color=red, style=dashed];

    D_f -> g_loss;
    label2 -> g_loss;

    g_loss -> D_f[color=green, style=dashed];
    D_f -> discriminator[color=green, style=dashed];
    discriminator -> G_img[color=green, style=dashed];
    G_img -> generator[color=green, style=dashed];

    discriminator [color=red, shape=box];
    generator [color=green, shape=box];
    z [shape=diamond];
    img [shape=diamond];
    label0 [shape=diamond];
    label1 [shape=diamond];
    label2 [shape=diamond];

    d_loss [color=red];
    g_loss [color=green];
}
