src.calculate_control_activations module
Calculate and save control concept image activations.
This script loads control images for different concepts, processes them through a specified neural network layer, and saves the resulting activation tensors for use in concept scoring.
- src.calculate_control_activations.main(argv)[source]
Main entry point for activation calculation pipeline.
Loads a model with a registered forward hook, iterates through all control concepts, calculates their activations, and saves them to disk organized by model ID and layer.
- Parameters:
argv – Command-line arguments (provided by absl).