I’m working on an inputter text to allow to encode words to generate new features like CharEmbbeder but for words.
Right now I’m getting a crash from tensorflow but I’m getting bold trying to fix it since I don’t get why is crashing. It would be really helpfull if someone could give me some insight
def transform(self, inputs, mode): timesteps = tf.shape(inputs) batch_size = tf.shape(inputs) sequence_length = tf.fill([batch_size], timesteps) embds = super(WordEmbedderEncoder, self).transform(inputs,mode) outputs, encoder_state, _ = self.encoder.encode(inputs=embds,sequence_length=sequence_length,mode=mode) encoding = last_encoding_from_state(encoder_state) outputs = tf.reshape(encoding, [-1, timesteps, tf.cast(self.encoder.num_units * 2,tf.int32)]) return outputs
InvalidArgumentError (see above for traceback): Input to reshape is a tensor with 8192 values, but the requested shape requires a multiple of 576
[[Node: seqclassifier/parallel_0/seqclassifier/encoder/inputter_3/Reshape = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _class=[“loc:@optim…ad/Reshape”], _device="/job:localhost/replica:0/task:0/device:CPU:0"](seqclassifier/parallel_0/seqclassifier/encoder/inputter_3/bi_layer_encoder/concat_3, seqclassifier/parallel_0/seqclassifier/encoder/inputter_3/Reshape/shape)]]