Skip to content

Unable to use the DataIQ_MAPS_Torch class #17

@overseek944

Description

@overseek944

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions