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