Hi,
Any suggestion about how I can enforce the output of this neural network be within an arbitrary range e.g. (0,0.5)?
class Net2_kc(nn.Module):
def init(self):
super(Net2_kc, self).init()
self.main = nn.Sequential(
nn.Linear(input_n,h_nk),
Swish(),
nn.Linear(h_nk,h_nk),
Swish(),
nn.Linear(h_nk,h_nk),
Swish(),
.
nn.Linear(h_nk,1),
)
 def forward(self,x):
        output = self.main(x)
        return  output