(self, inputs, **kwargs)
| 43 | ] |
| 44 | |
| 45 | def call(self, inputs, **kwargs): |
| 46 | if K.ndim(inputs) != 2: |
| 47 | raise ValueError("The dim of inputs should be 2, not %d" % (K.ndim(inputs))) |
| 48 | emb = tf.transpose( |
| 49 | tf.convert_to_tensor( |
| 50 | [layer(inputs[:, i]) for i, layer in enumerate(self.emb_layers)] |
| 51 | ), |
| 52 | [1, 0, 2], |
| 53 | ) |
| 54 | emb = tf.reshape(emb, shape=(-1, emb.shape[1] * emb.shape[2])) |
| 55 | return emb |
| 56 | |
| 57 | |
| 58 | class Res_layer(Layer): |
nothing calls this directly
no outgoing calls
no test coverage detected