Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use the DataIQ_MAPS_Torch class #17

Open
overseek944 opened this issue Apr 5, 2024 · 0 comments
Open

Unable to use the DataIQ_MAPS_Torch class #17

overseek944 opened this issue Apr 5, 2024 · 0 comments

Comments

@overseek944
Copy link

overseek944 commented Apr 5, 2024

Description

I am trying to use DataIQ_MAPS_Torch class with the following piece of code -


X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.15, random_state=0)
X_train = std_scaler.fit_transform(X_train)
X_test = std_scaler.transform(X_test)

datahander = DataHandler(X_train, y_train, batch_size=32)
dataloader_ = DataLoader(datahander.dataloader,batch_size=32)

model = DataIQ_MAPS_Torch(dataloader_)

# creating our optimizer and loss function objects
learning_rate = 0.01
criterion = nn.CrossEntropyLoss()
optimizer = torch.optim.Adam(<unknown>,lr=learning_rate)

I am not able to understand what should I put in the <unkown> field in the last of above provided code.

I tried to same thing with SimpleMLP but I didn't got issue there because class is defined with SimpleMLP(nn.module)
so there model.parameters() is not failing while defining optimizer but while using the same code with DataIQ_MAPS_Torch class its not able to understand model.parameters() because its not a nn.module class.

My ask is how can I use DataIQ_MAPS_Torch similar to SimpleMLP?
Can you share a sample code for the same?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant