original_docstring: 
          Calculating the cosinus values depending on the number of tau samples
          
docstring: Calculating the cosinus values depending on the number of tau samples
docstring_tokens: Calculating the cosinus values depending on the number of tau samples
code: def calc_cos(self, batch_size, n_tau=32):
          """
          Calculating the cosinus values depending on the number of tau samples
          """
          taus = th.rand(batch_size, n_tau).unsqueeze(-1).to(self.device)  # (batch_size, n_tau, 1)  .to(self.device)
          cos = th.cos(taus * self.pis.to(self.device))
  
          assert cos.shape == (batch_size, n_tau, self.n_cos), "cos shape is incorrect"
          return cos, taus
code_tokens: def calc_cos ( self , batch_size , n_tau = 32 ) : taus = th . rand ( batch_size , n_tau ) . unsqueeze ( - 1 ) . to ( self . device ) cos = th . cos ( taus * self . pis . to ( self . device ) ) assert cos . shape == ( batch_size , n_tau , self . n_cos ) , "cos shape is incorrect" return cos , taus
short_docstring: Calculating the cosinus values depending on the number of tau samples
short_docstring_tokens: Calculating the cosinus values depending on the number of tau samples
comment: """
          Calculating the cosinus values depending on the number of tau samples
          """$SEP$# (batch_size, n_tau, 1)  .to(self.device)
  