File size: 4,857 Bytes
22e9602 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | [
{
"function_name": "NAD.__init__",
"file_path": "Provided_Code",
"function_calls": [
{
"function_call_name": "super",
"functionality": "Calls the __init__ method of the parent class (nn.Module).",
"input": "NAD, self",
"output": "None",
"location_or_namespace": "builtins"
},
{
"function_call_name": "range",
"functionality": "Generates a sequence of numbers.",
"input": "self.graphdata.hop",
"output": "Iterator",
"location_or_namespace": "builtins"
},
{
"function_call_name": "list.append",
"functionality": "Appends an object to the end of the list.",
"input": "nn.Linear(in_dim, hidden_dim) or nn.Linear(hidden_dim, hidden_dim)",
"output": "None",
"location_or_namespace": "builtins"
},
{
"function_call_name": "torch.nn.Linear",
"functionality": "Applies a linear transformation to the incoming data.",
"input": "in_features, out_features",
"output": "Linear module object",
"location_or_namespace": "torch.nn"
},
{
"function_call_name": "len",
"functionality": "Returns the number of items in an object.",
"input": "self.convs",
"output": "Integer",
"location_or_namespace": "builtins"
},
{
"function_call_name": "torch.nn.LeakyReLU",
"functionality": "Applies the Leaky Rectified Linear Unit function element-wise.",
"input": "",
"output": "LeakyReLU module object",
"location_or_namespace": "torch.nn"
},
{
"function_call_name": "torch.nn.BatchNorm1d",
"functionality": "Applies Batch Normalization over a 2D or 3D input.",
"input": "num_features",
"output": "BatchNorm1d module object",
"location_or_namespace": "torch.nn"
},
{
"function_call_name": "self.init_weight",
"functionality": "Initializes the weights of the model's linear layers.",
"input": "init",
"output": "None",
"location_or_namespace": "Provided_Code"
}
]
},
{
"function_name": "NAD.init_weight",
"file_path": "Provided_Code",
"function_calls": [
{
"function_call_name": "range",
"functionality": "Generates a sequence of numbers.",
"input": "self.graphdata.hop",
"output": "Iterator",
"location_or_namespace": "builtins"
},
{
"function_call_name": "torch.nn.init.normal_",
"functionality": "Fills the input Tensor with values drawn from the normal distribution.",
"input": "tensor, mean, std",
"output": "Tensor",
"location_or_namespace": "torch.nn.init"
}
]
},
{
"function_name": "NAD.forward",
"file_path": "Provided_Code",
"function_calls": [
{
"function_call_name": "torch.zeros",
"functionality": "Returns a tensor filled with the scalar value 0, with the shape defined by the variable argument size.",
"input": "[len(self.graphdata.features), 0]",
"output": "Tensor",
"location_or_namespace": "torch"
},
{
"function_call_name": "len",
"functionality": "Returns the number of items in an object.",
"input": "self.graphdata.features",
"output": "Integer",
"location_or_namespace": "builtins"
},
{
"function_call_name": "enumerate",
"functionality": "Returns an enumerate object. iterable must be a sequence, an iterator, or some other object which supports iteration.",
"input": "self.convs",
"output": "Enumerate object",
"location_or_namespace": "builtins"
},
{
"function_call_name": "torch.cat",
"functionality": "Concatenates the given sequence of seq tensors in the given dimension.",
"input": "[h_final, h], -1",
"output": "Tensor",
"location_or_namespace": "torch"
},
{
"function_call_name": "torch.pow",
"functionality": "Takes the power of each element in input with exponent and returns a tensor with the result.",
"input": "input_tensor, exponent",
"output": "Tensor",
"location_or_namespace": "torch"
},
{
"function_call_name": "torch.mean",
"functionality": "Returns the mean value of all elements in the input tensor.",
"input": "input_tensor, dim, keepdim (optional)",
"output": "Tensor",
"location_or_namespace": "torch"
},
{
"function_call_name": "torch.sigmoid",
"functionality": "Applies the element-wise function sigmoid.",
"input": "input_tensor",
"output": "Tensor",
"location_or_namespace": "torch"
}
]
}
] |