RECODE-H / annotations /annotation_44 /function_info.json
mcy98's picture
Upload folder using huggingface_hub
6077218 verified
Raw History Blame Contribute Delete
6.68 kB
[
{
"function_name": "HomoGCL.__init__",
"file_path": "homogcl_model.py",
"function_calls": [
{
"function_call_name": "__init__",
"functionality": "Initializes the parent nn.Module class.",
"input": "self (implicit)",
"output": "None",
"location_or_namespace": "torch.nn.Module"
},
{
"function_call_name": "GCN",
"functionality": "Initializes a Graph Convolutional Network model object.",
"input": "in_dim, hid_dim, out_dim, n_layers",
"output": "GCN model instance",
"location_or_namespace": "gcn_module.py"
},
{
"function_call_name": "Linear",
"functionality": "Creates a linear transformation layer (y = xA^T + b).",
"input": "in_features, out_features, bias=True",
"output": "torch.nn.Linear instance",
"location_or_namespace": "torch.nn"
},
{
"function_call_name": "GraphConv",
"functionality": "Creates a Graph Convolutional layer from DGL.",
"input": "in_feats, out_feats, norm='both', weight=True, bias=True, activation=None, allow_zero_in_degree=False",
"output": "dgl.nn.pytorch.GraphConv instance",
"location_or_namespace": "dgl.nn"
}
]
},
{
"function_name": "HomoGCL.posaug",
"file_path": "homogcl_model.py",
"function_calls": [
{
"function_call_name": "self.neighboraggr",
"functionality": "Applies graph convolution to input features using the pre-initialized GraphConv layer.",
"input": "graph, x, edge_weight=edge_weight",
"output": "Tensor containing the new node representations",
"location_or_namespace": "dgl.nn.GraphConv"
}
]
},
{
"function_name": "HomoGCL.forward",
"file_path": "homogcl_model.py",
"function_calls": [
{
"function_call_name": "self.encoder",
"functionality": "Encodes graph features using the GCN model to produce node embeddings.",
"input": "graph, features (e.g., graph1, feat1)",
"output": "Tensor of node embeddings",
"location_or_namespace": "gcn_module.py"
}
]
},
{
"function_name": "HomoGCL.projection",
"file_path": "homogcl_model.py",
"function_calls": [
{
"function_call_name": "self.fc1",
"functionality": "Applies the first linear transformation of the projection head.",
"input": "z (input tensor)",
"output": "Transformed tensor",
"location_or_namespace": "torch.nn.Linear"
},
{
"function_call_name": "elu",
"functionality": "Applies the Exponential Linear Unit activation function.",
"input": "input_tensor, alpha=1.0, inplace=False",
"output": "Tensor with ELU applied",
"location_or_namespace": "torch.nn.functional"
},
{
"function_call_name": "self.fc2",
"functionality": "Applies the second linear transformation of the projection head.",
"input": "input_tensor (output of ELU)",
"output": "Projected tensor",
"location_or_namespace": "torch.nn.Linear"
}
]
},
{
"function_name": "HomoGCL.semi_loss",
"file_path": "homogcl_model.py",
"function_calls": [
{
"function_call_name": "sim",
"functionality": "Computes pairwise similarity between two input tensors of embeddings.",
"input": "tensor1, tensor2",
"output": "Similarity matrix (tensor)",
"location_or_namespace": "utils.py"
},
{
"function_call_name": "exp",
"functionality": "Computes the element-wise exponential of the input tensor.",
"input": "input_tensor",
"output": "Tensor with exponential applied",
"location_or_namespace": "torch"
},
{
"function_call_name": "diag",
"functionality": "Extracts the diagonal of a tensor or creates a diagonal tensor.",
"input": "input_tensor, diagonal=0",
"output": "Tensor containing the diagonal or a diagonal tensor",
"location_or_namespace": "torch.Tensor"
},
{
"function_call_name": "sum",
"functionality": "Sums tensor elements along a given dimension.",
"input": "input_tensor, dim, keepdim=False, dtype=None",
"output": "Tensor with sums",
"location_or_namespace": "torch.Tensor"
},
{
"function_call_name": "log",
"functionality": "Computes the element-wise natural logarithm of the input tensor.",
"input": "input_tensor",
"output": "Tensor with natural logarithm applied",
"location_or_namespace": "torch"
}
]
},
{
"function_name": "HomoGCL.loss",
"file_path": "homogcl_model.py",
"function_calls": [
{
"function_call_name": "self.projection",
"functionality": "Projects node embeddings into a new latent space using the projection head.",
"input": "z (embedding tensor)",
"output": "Projected embedding tensor",
"location_or_namespace": "homogcl_model.py"
},
{
"function_call_name": "self.semi_loss",
"functionality": "Computes a component of the contrastive loss based on similarities.",
"input": "z1, adj1, z2, adj2, confmatrix, mean",
"output": "Loss tensor for one direction",
"location_or_namespace": "homogcl_model.py"
},
{
"function_call_name": "mean",
"functionality": "Computes the mean of all elements in the input tensor.",
"input": "input_tensor, dtype=None",
"output": "Scalar tensor representing the mean",
"location_or_namespace": "torch.Tensor"
}
]
},
{
"function_name": "HomoGCL.get_embedding",
"file_path": "homogcl_model.py",
"function_calls": [
{
"function_call_name": "no_grad",
"functionality": "Context-manager that disables gradient calculation.",
"input": "None",
"output": "Context manager object",
"location_or_namespace": "torch"
},
{
"function_call_name": "self.encoder",
"functionality": "Encodes graph features using the GCN model to produce node embeddings.",
"input": "graph, feat",
"output": "Tensor of node embeddings",
"location_or_namespace": "gcn_module.py"
},
{
"function_call_name": "detach",
"functionality": "Returns a new tensor, detached from the current computation graph.",
"input": "self (implicit input tensor)",
"output": "Detached tensor",
"location_or_namespace": "torch.Tensor"
}
]
}
]