code: def count_params(self):
          
          n_params = 0
          for _i, p in enumerate(self.all_params):
              n = 1
              # for s in p.eval().shape:
              for s in p.get_shape():
                  try:
                      s = int(s)
                  except Exception:
                      s = 1
                  if s:
                      n = n * s
              n_params = n_params + n
          return n_params
docs: Returns the number of parameters in the network.