TypeError Traceback (most recent call last) Cell In[12], line 2 1 # Create Dataset…
Jump to turn (15)
- 1TypeError Traceback (most recent call last) Cell In[12], line 2 1 # Create Datas
- 2I need help writing a training script for our Audio AI / Human detection model.
- 3--------------------------------------------------------------------------- Name
- 4This code: from torch.utils.data import Dataset, DataLoader import torch Assume
- 5copy pasted ur code and got this error: from torch.utils.data import Dataset, Da
- 6I need you to help me. I have this script import os import numpy as np import li
- 7Loss function and optimizer criterion = nn.CrossEntropyLoss() optimizer = optim.
- 8here is the model # Defining the neural network architecture class AudioClassifi
- 9how do I show you so you can tell me what the inputshape should be
- 10here is the shape (36, 128, 697) what should our inputsize be
- 11here is our model: class AudioClassifier(nn.Module): def init(self): super(Audio
- 12I think you are wrong, I think this is the issue: This happens because model.par
- 13I need you to rewrite the model to avoid this issue
- 14dude this does not work still running into same error
- 15from sklearn import tree from sklearn.modelselection import traintestsplit from
- User
TypeError Traceback (most recent call last) Cell In[12], line 2 1 # Create Dataset instances for training and validation sets ----> 2 train_dataset = AudioDataset(X_train, y_train) 3 val_dataset = AudioDataset(X_val, y_val)
File /anaconda/envs/azureml_py38_PT_TF/lib/python3.8/typing.py:875, in Generic.new(cls, *args, **kwds) 873 obj = super().new(cls) 874 else: --> 875 obj = super().new(cls, *args, **kwds) 876 return obj
TypeError: object.new() takes exactly one argument (the type to instantiate) # Create Dataset instances for training and validation sets train_dataset = AudioDataset(X_train, y_train) val_dataset = AudioDataset(X_val, y_val) help
- Assistant