This error appears when we try initialize a matrix with a constant matrix however the shape does not match
For example,
tf.get_variable("word_embeddings",shape=[len(vocab_dict), self.embedding_size],initializer=tf.constant_initializer(initializer))
if len(vocab_dic) x self.embedding_size is not equal to intiializer then it throws above error. It can be fixed by keeping the shapes same.