Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Layers do not clear inputs, even when they are invalidated by workspaces #4291
This short code gist runs VGG16 with image net weights and then tries to analyze the intermediate activation of a particular layer:
I have successfully used VGG16 before, but only the final outputs. However, when I run this code, it crashes with a Fatal Error:
The full error contents of the error report file are here:
It's possible I'm using the activate() method wrong, but even if I am, it seems in appropriate to receive a fatal error rather than a more straight forward exception.
Please indicate relevant versions, including, if relevant:
This appears to be due to workspaces, and (given the use of workspaces by default for inference).
Moving forward, no-arg methods like activate() will be for internal use only - in part because this sort of "stateful" behaviour will be changed.
Anyway, to get the activations you want: you can use the feedForward methods on ComputationGraph, with return a
Edit: another workaround (though beware of the memory cost in general) is to disable the inference workspace: