you could use register_buffer 37
class TDNN(nn.Module):
    def __init__(......):
        self.register_buffer('context', torch.LongTensor(context))
        self.kernel = nn.Parameter(torch.Tensor(output_dim, input_dim, self.kernel_width).normal_(0,stdv))
        self.bias = nn.Parameter(torch.Tensor(output_dim).normal_(0,stdv))