thank you for your reply, after i add comma, I tried to call function with tempsigmoid() but gives error it need 1 argument. When i tried using tempsigmoid(x) i have error in my data that said
TypeError: mul(): argument ‘other’ (position 1) must be Tensor, not numpy.ndarray. It means my data still in the form of numpy?
class CustomDataset(Dataset):
    def __init__(self, x, y, transform=None):
        self.x = torch.from_numpy(x).float()
        self.y = torch.from_numpy(y).float()
        self.transform = transform
        
    def __getitem__(self, index):
        x = self.x[index]
        y = self.y[index]
        
        if self.transform:
            x = self.transform(x)
        
        return x, y
    
    def __len__(self):
        return len(self.x)