Skip to content
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

add api to anvil #66

Merged
merged 1 commit into from
Apr 27, 2021
Merged

add api to anvil #66

merged 1 commit into from
Apr 27, 2021

Conversation

wilsonmr
Copy link
Owner

Sorry for not adding this earlier, I suspect it could have helped with experimentation.

@wilsonmr wilsonmr requested a review from jmarshrossney April 26, 2021 16:55
@wilsonmr
Copy link
Owner Author

btw @marshrossney it might be simpler to use this to write the script/notebook which samples intermediate layers and plots it. because you can load up the model using this and then loop through the layers and do the forward pass manually idk, up to you..

@wilsonmr
Copy link
Owner Author

potentially you could use the "hack" to patch each layer output into the plotting action in lieu of the real sample

schematically:

API.<plotting action>(configs=torch.zeros(....))

where you replace the torch tensor with the tensors you just manually created.

@jmarshrossney
Copy link
Collaborator

Ok this looks really useful!

That said, though I'm seeing it for the first time, I'm not sure it should replace a reportengine loop over layer_id to sample the intermediate layers, which should work well once #64 has been properly sorted. But it's always nice to have more than one way to do something.

@wilsonmr
Copy link
Owner Author

You're right, I think that approch is the best

but generally this should make scripts a bit easier, and then if you write functions which accept inputs from the API then it should be easier to translate a function in a script into a useable action

@wilsonmr wilsonmr merged commit 209a337 into master Apr 27, 2021
@wilsonmr wilsonmr mentioned this pull request Apr 27, 2021
Closed
@jmarshrossney jmarshrossney deleted the add-api branch May 21, 2021 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants