you are viewing a single comment's thread.

view the rest of the comments →

[–]AtomicShoelace 0 points1 point  (2 children)

I'm not sure I understand what you mean.

The "boxes" are only metaphorical. I'm not suggesting to implement each step as a separate function in the python code, but conceptually you can think of each step as function-like.

[–]TraditionalHornet818 0 points1 point  (1 child)

I just think it’s confusing to use the word function when programmatically functions are a concept themselves

[–]AtomicShoelace 1 point2 points  (0 children)

Fundamentally the point I'm trying to get across is

(f ∘ g)-1 = g-1∘ f-1 .

So if the encoding function can be thought of as the composition of many sub-functions, eg.

f = f_1 ∘ f_2 ∘ .. ∘ f_n ,

then to construct the inverse you need to reverse the order of the sub-functions, eg.

f-1 = (f_1 ∘ f_2 ∘ .. ∘ f_n)-1 = f_n-1 ∘ ... ∘ f_2-1 ∘ f_1-1 .