models/dr_constant.py [26:43]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        treatments_transformed = torch.clamp(torch.exp(treatments) - 1.0, 1e-12, 1e6)
        c6a, c12a = torch.unbind(treatments_transformed, axis=1)
        c6 = torch.transpose(c6a.repeat([self.n_iwae, 1]), 0, 1)
        c12 = torch.transpose(c12a.repeat([self.n_iwae, 1]), 0, 1)

        # need to clip these to avoid overflow
        self.r = torch.clamp(theta.r, 0.0, 4.0)
        self.K = torch.clamp(theta.K, 0.0, 4.0)
        self.tlag = theta.tlag
        self.rc = theta.rc
        self.a530 = theta.a530
        self.a480 = theta.a480

        self.drfp = torch.clamp(theta.drfp, 1e-12, 2.0)
        self.dyfp = torch.clamp(theta.dyfp, 1e-12, 2.0)
        self.dcfp = torch.clamp(theta.dcfp, 1e-12, 2.0)
        self.dR = torch.clamp(theta.dR, 1e-12, 5.0)
        self.dS = torch.clamp(theta.dS, 1e-12, 5.0)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



models/relay_constant.py [28:45]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        treatments_transformed = torch.clamp(torch.exp(treatments) - 1.0, 1e-12, 1e6)
        c6a, c12a = torch.unbind(treatments_transformed, axis=1)
        c6 = torch.transpose(c6a.repeat([self.n_iwae, 1]), 0, 1)
        c12 = torch.transpose(c12a.repeat([self.n_iwae, 1]), 0, 1)

        # need to clip these to avoid overflow
        self.r = torch.clamp(theta.r, 0.0, 4.0)
        self.K = torch.clamp(theta.K, 0.0, 4.0)
        self.tlag = theta.tlag
        self.rc = theta.rc
        self.a530 = theta.a530
        self.a480 = theta.a480

        self.drfp = torch.clamp(theta.drfp, 1e-12, 2.0)
        self.dyfp = torch.clamp(theta.dyfp, 1e-12, 2.0)
        self.dcfp = torch.clamp(theta.dcfp, 1e-12, 2.0)
        self.dR = torch.clamp(theta.dR, 1e-12, 5.0)
        self.dS = torch.clamp(theta.dS, 1e-12, 5.0)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



