latent-diffusion icon indicating copy to clipboard operation
latent-diffusion copied to clipboard

What is rel_pos in the x_transformer.py file?

Open azadis opened this issue 3 years ago • 2 comments

Based on what has been defined here, self.rel_pos would be a function that always returns None. Is there any specific reason for this?

azadis avatar Feb 10 '22 21:02 azadis

We used the transformer implementation of lucidrains, which includes lots of different positional encodings. As we never used relative position encodings, we always set it to None to avoid adaptations to the forward()-method of the individual attention layers.

ablattmann avatar Feb 21 '22 13:02 ablattmann

please close if this answers your question :)

ablattmann avatar Feb 21 '22 13:02 ablattmann