-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draw trivial tokens and indices #12
Conversation
this draws them, but mysteriously labels them with FF in the drawing (instead of X, as they are labeled when drawing computation flows with actual computations). is it possible to get them to show up the same way they would normally? |
0e18e37
to
24dc40f
Compare
24dc40f
to
7eb826b
Compare
They're now labelled 'X' in the computational flow figures. It's not an elegant solution, but the existing code only considers feedforward layers and would otherwise need to be rewritten. |
if i understand correctly, you've treated them as their own parents, forcing them into the X row. it seems like a nice solution to me! Can you add comments to the changes you've made, so it's clear why this special case (len(ffs)==1) exists now? i.e. specifically highlight around all your changes that len(ffs) == 1 implies we are drawing just a tokens/indices sop by itself, and (if it's confusing, eg switching ffs and their parents) explain what (and why) you are doing in this special case |
Thanks. I've added comments to explain the changes. |
it's a nice trick, but i don't like the use of the 'constant' patch as it permanently marks that sequence as a constant, which later creates strange behaviour (e.g. if you do |
I figured that it was safe to (ab)use the |
The trivial case, in which the feedforward layers and their parents are to be swapped, is now identified by the length of the respective lists. This avoids using the |
Presently, drawing tokens or indices by themselves (for example,
draw(tokens)
ordraw(indices, "hello")
) results in an empty figure. This adds support for drawing trivial tokens and indices, as feedforward layers.