lauracabayol commited on
Commit
26b28ad
·
1 Parent(s): af2bb4b

last version of architecture

Browse files
Files changed (1) hide show
  1. insight/insight_arch.py +8 -2
insight/insight_arch.py CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  from torch import nn, optim
2
  import torch
3
  class Photoz_network(nn.Module):
@@ -41,14 +44,17 @@ class Photoz_network(nn.Module):
41
  nn.Linear(20, num_gauss)
42
  )
43
 
 
44
  def forward(self, x):
45
  f = self.features(x)
46
  mu = self.measure_mu(f)
47
  sigma = self.measure_sigma(f)
48
  logmix_coeff = self.measure_coeffs(f)
49
-
50
  logmix_coeff = logmix_coeff - torch.logsumexp(logmix_coeff, 1)[:,None]
51
-
52
  return mu, sigma, logmix_coeff
 
 
53
 
54
 
 
1
+ from torch import nn, optim
2
+ import torch
3
+
4
  from torch import nn, optim
5
  import torch
6
  class Photoz_network(nn.Module):
 
44
  nn.Linear(20, num_gauss)
45
  )
46
 
47
+
48
  def forward(self, x):
49
  f = self.features(x)
50
  mu = self.measure_mu(f)
51
  sigma = self.measure_sigma(f)
52
  logmix_coeff = self.measure_coeffs(f)
53
+
54
  logmix_coeff = logmix_coeff - torch.logsumexp(logmix_coeff, 1)[:,None]
55
+
56
  return mu, sigma, logmix_coeff
57
+
58
+
59
 
60