(self, inputs)
| 160 | self._log_vars() |
| 161 | |
| 162 | def _call(self, inputs): |
| 163 | x = inputs |
| 164 | |
| 165 | # dropout |
| 166 | if self.sparse_inputs: |
| 167 | x = sparse_dropout(x, 1-self.dropout, self.num_features_nonzero) |
| 168 | else: |
| 169 | x = tf.nn.dropout(x, 1-self.dropout) |
| 170 | |
| 171 | # convolve |
| 172 | supports = list() |
| 173 | for i in range(len(self.support)): |
| 174 | if not self.featureless: |
| 175 | pre_sup = dot(x, self.vars['weights_' + str(i)], |
| 176 | sparse=self.sparse_inputs) |
| 177 | else: |
| 178 | pre_sup = self.vars['weights_' + str(i)] |
| 179 | support = dot(self.support[i], pre_sup, sparse=True) |
| 180 | supports.append(support) |
| 181 | output = tf.add_n(supports) |
| 182 | |
| 183 | # bias |
| 184 | if self.bias: |
| 185 | output += self.vars['bias'] |
| 186 | |
| 187 | return self.act(output) |
| 188 | |
| 189 | class GraphPooling(Layer): |
| 190 | """Graph Pooling layer.""" |
nothing calls this directly
no test coverage detected