(m)
| 1 | # custom weights initialization called on netG and netD |
| 2 | def weights_init(m): |
| 3 | classname = m.__class__.__name__ |
| 4 | if classname.find('Conv') != -1: |
| 5 | m.weight.data.normal_(0.0, 0.02) |
| 6 | elif classname.find('BatchNorm') != -1: |
| 7 | m.weight.data.normal_(1.0, 0.02) |
| 8 | m.bias.data.fill_(0) |
| 9 | |
| 10 | # compute the current classification accuracy |
| 11 | def compute_acc(preds, labels): |
nothing calls this directly
no outgoing calls
no test coverage detected