MCPcopy Index your code
hub / github.com/nywang16/Pixel2Mesh / _call

Method _call

p2m/layers.py:162–187  ·  view source on GitHub ↗
(self, inputs)

Source from the content-addressed store, hash-verified

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
189class GraphPooling(Layer):
190 """Graph Pooling layer."""

Callers

nothing calls this directly

Calls 2

sparse_dropoutFunction · 0.85
dotFunction · 0.85

Tested by

no test coverage detected