(self, input_shape)
| 89 | self.bias_initializer = bias_initializer |
| 90 | |
| 91 | def build(self, input_shape): |
| 92 | input_shape = tf.TensorShape(input_shape) |
| 93 | self.kernel = tf.get_variable( |
| 94 | 'kernel', |
| 95 | shape=[input_shape[-1].value, self.dim], |
| 96 | initializer=self.kernel_initializer()) |
| 97 | if self.use_bias: |
| 98 | self.bias = tf.get_variable( |
| 99 | 'bias', |
| 100 | shape=[self.dim], |
| 101 | initializer=self.bias_initializer()) |
| 102 | else: |
| 103 | self.bias = None |
| 104 | self.built = True |
| 105 | |
| 106 | def call(self, inputs): |
| 107 | rank = inputs.shape.ndims |
nothing calls this directly
no test coverage detected