Hi! I’m trying to script_method the function below and jit complains “attribute lookup is not defined on builtin” for memory.data.new. I tried other variations: 1) torch.zeros, 2) torch.cuda.FloatTensor(shape).zero_() and nothing seems to work.
Any suggestion is welcome. The full model code can be found here:

  
      github.com
  
  
    NVIDIA/tacotron2/blob/master/model.py#L244 4

        hparams.decoder_rnn_dim, 1)


    self.linear_projection = LinearNorm(
        hparams.decoder_rnn_dim + hparams.encoder_embedding_dim,
        hparams.n_mel_channels * hparams.n_frames_per_step)


    self.gate_layer = LinearNorm(
        hparams.decoder_rnn_dim + hparams.encoder_embedding_dim, 1,
        bias=True, w_init_gain='sigmoid')


def get_go_frame(self, memory):
    """ Gets all zeros frames to use as first decoder input
    PARAMS
    ------
    memory: decoder outputs


    RETURNS
    -------
    decoder_input: all zeros frames
    """
    B = memory.size(0)



  
  
    
    
  
  


    def get_go_frame(self, memory):
        decoder_input = Variable(memory.data.new(
            memory.size(0), self.n_mel_channels * self.n_frames_per_step).zero_())
        return decoder_input