HyperGAN
Search…
segment_softmax
1
description: 'layer segment_softmax for configurable component'
2
---
3
4
# segment_softmax layer
5
6
`segment_softmax` is a custom layer that allows for masking multiple output channels.
7
8
Suppose you have 30 channels and `segment_softmax 3`. First, the 30 channels split into 15/15.
9
The first 15 will be used for softmax and multiplied against the second.
10
Then each channel is softmaxed, multiplied, and summed.
11
12
So 30 input channels with 3 output channels equate to 5 input channels for each output channel.
13
14
## input size
15
16
Any 4-d tensor of the shape `[B, C, H, W]`
17
18
## output size
19
20
[B, OUTPUT_CHANNELS, H, W]
21
22
## syntax
23
24
```json
25
"segment_softmax OUTPUT_CHANNELS"
26
```
27
28
## examples
29
30
At the end of the generator for RGB images:
31
32
```json
33
"conv 30",
34
"segment_softmax 3",
35
"hardtanh"
36
```
Copied!
Last modified 1yr ago
Copy link