def get_activation(name):

    def hook(model, input, output):
        activation[name] = output.detach()
    return hook
def get_activation(name):

    def hook(model, input, output):
        activation[name] = output.detach()
    return hook