← Lesson
Encoder vs Decoder
Joeven
Run
Reset
Python loads on first run
def allowed(i, j, kind): if kind == "encoder": return True if kind == "decoder": return j <= i return False n = 4 for kind in ("encoder", "decoder"): print(kind) for i in range(n): row = [("Y" if allowed(i, j, kind) else ".") for j in range(n)] print("q" + str(i), " ".join(row)) print("encoder-decoder would encode with a full square, then decode with a triangle plus cross-attn to the encoder")
Run to execute this in your browser. Nothing is sent to a server.