File size: 5,382 Bytes
6077218
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
[
  {
    "function_name": "WukongLayer.__init__",
    "file_path": "model/pytorch/wukong.py",
    "function_calls": [
      {
        "function_call_name": "super().__init__",
        "functionality": "Call parent class initializer (nn.Module)",
        "input": "",
        "output": "None",
        "location_or_namespace": "torch.nn.Module"
      },
      {
        "function_call_name": "LinearCompressBlock",
        "functionality": "",
        "input": "num_emb_in, num_emb_lcb",
        "output": "LinearCompressBlock instance",
        "location_or_namespace": "model/pytorch/wukong.py"
      },
      {
        "function_call_name": "FactorizationMachineBlock",
        "functionality": "",
        "input": "num_emb_in, num_emb_fmb, dim_emb, rank_fmb, num_hidden, dim_hidden, dropout",
        "output": "FactorizationMachineBlock instance",
        "location_or_namespace": "model/pytorch/wukong.py"
      },
      {
        "function_call_name": "nn.LayerNorm",
        "functionality": "Applies Layer Normalization over a mini-batch of inputs",
        "input": "dim_emb",
        "output": "LayerNorm instance",
        "location_or_namespace": "torch.nn"
      },
      {
        "function_call_name": "ResidualProjection",
        "functionality": "",
        "input": "num_emb_in, num_emb_lcb + num_emb_fmb",
        "output": "ResidualProjection instance",
        "location_or_namespace": "model/pytorch/wukong.py"
      },
      {
        "function_call_name": "nn.Identity",
        "functionality": "A placeholder identity operator that is argument-insensitive",
        "input": "",
        "output": "Identity instance",
        "location_or_namespace": "torch.nn"
      }
    ]
  },
  {
    "function_name": "WukongLayer.forward",
    "file_path": "model/pytorch/wukong.py",
    "function_calls": [
      {
        "function_call_name": "self.lcb",
        "functionality": "",
        "input": "inputs",
        "output": "Tensor",
        "location_or_namespace": "model/pytorch/wukong.py"
      },
      {
        "function_call_name": "self.fmb",
        "functionality": "",
        "input": "inputs",
        "output": "Tensor",
        "location_or_namespace": "model/pytorch/wukong.py"
      },
      {
        "function_call_name": "torch.concat",
        "functionality": "Concatenate tensors along a specified dimension",
        "input": "(fmb, lcb), dim=1",
        "output": "Tensor",
        "location_or_namespace": "torch"
      },
      {
        "function_call_name": "self.residual_projection",
        "functionality": "",
        "input": "inputs",
        "output": "Tensor",
        "location_or_namespace": "model/pytorch/wukong.py"
      },
      {
        "function_call_name": "self.norm",
        "functionality": "",
        "input": "outputs + self.residual_projection(inputs)",
        "output": "Tensor",
        "location_or_namespace": "model/pytorch/wukong.py"
      }
    ]
  },
  {
    "function_name": "Wukong.__init__",
    "file_path": "model/pytorch/wukong.py",
    "function_calls": [
      {
        "function_call_name": "super().__init__",
        "functionality": "Call parent class initializer (nn.Module)",
        "input": "",
        "output": "None",
        "location_or_namespace": "torch.nn.Module"
      },
      {
        "function_call_name": "Embedding",
        "functionality": "",
        "input": "num_sparse_emb, dim_emb, dim_input_dense",
        "output": "Embedding instance",
        "location_or_namespace": "model/pytorch/embedding.py"
      },
      {
        "function_call_name": "WukongLayer",
        "functionality": "",
        "input": "num_emb_in, dim_emb, num_emb_lcb, num_emb_fmb, rank_fmb, num_hidden_wukong, dim_hidden_wukong, dropout",
        "output": "WukongLayer instance",
        "location_or_namespace": "model/pytorch/wukong.py"
      },
      {
        "function_call_name": "MLP",
        "functionality": "",
        "input": "(num_emb_lcb + num_emb_fmb) * dim_emb, num_hidden_head, dim_hidden_head, dim_output, dropout",
        "output": "MLP instance",
        "location_or_namespace": "model/pytorch/mlp.py"
      }
    ]
  },
  {
    "function_name": "Wukong.forward",
    "file_path": "model/pytorch/wukong.py",
    "function_calls": [
      {
        "function_call_name": "self.embedding",
        "functionality": "",
        "input": "sparse_inputs, dense_inputs",
        "output": "Tensor",
        "location_or_namespace": "model/pytorch/embedding.py"
      },
      {
        "function_call_name": "self.interaction_layers",
        "functionality": "",
        "input": "outputs",
        "output": "Tensor",
        "location_or_namespace": "model/pytorch/wukong.py"
      },
      {
        "function_call_name": "Tensor.view",
        "functionality": "Reshapes the tensor to the specified shape",
        "input": "-1, (self.num_emb_lcb + self.num_emb_fmb) * self.dim_emb",
        "output": "Tensor",
        "location_or_namespace": "torch.Tensor"
      },
      {
        "function_call_name": "self.projection_head",
        "functionality": "",
        "input": "outputs",
        "output": "Tensor",
        "location_or_namespace": "model/pytorch/mlp.py"
      }
    ]
  }
]