GNN(in_dim, hid_dim, num_classes, num_layers=2, dropout=0.0, gnn='gcn', act=F.relu, weight_decay=0.0001, lr=0.05, epoch=100, device='cuda:0', batch_size=0, num_neigh=-1, verbose=2, **kwargs)
Bases: BaseGDA
General GNN model without adaptation.
| Parameters: |
|
|---|
fit(source_data, target_data)
Train the GNN model.
| Parameters: |
|
|---|
Notes
The training process includes: - Creating data loaders for both domains - Initializing the GNN model and optimizer - Training for specified number of epochs - Logging training progress (loss and micro-F1 score)
forward_model(source_data, target_data)
Forward pass of the model.
| Parameters: |
|
|---|
| Returns: |
|
|---|
init_model(**kwargs)
Initialize the GNN model.
| Parameters: |
|
|---|
| Returns: |
|
|---|
predict(data)
Make predictions using the trained model.
| Parameters: |
|
|---|
| Returns: |
|
|---|
process_graph(data)
Process the input graph data.
| Parameters: |
|
|---|
Notes
This is a placeholder method that should be implemented by subclasses if graph preprocessing is needed.