<jupyter_start><jupyter_text>Gradient X Activation<jupyter_code># Gradient X Activation
import captum

submodel = activations_tool.Submodel(model, (4, 0, 5))
ga = captum.attr.LayerGradientXActivation(submodel, submodel.model.layer4[0].conv1)

input_t = activations_tool.transform(image)

for i in range(2048):
    ga.attribute(input_t, )<jupyter_output><empty_output><jupyter_text>Investigating the Hat's Text Facets<jupyter_code>activations_tool.channel_difference_engine(activations_tool.map_microscope_layer(activations_tool.model, (4, 2, 6)), rasterize_text("H"), rasterize_text("eeeeee"))

# Turns out the hat has text facet H @ 4/2/6/1188, not 4/2/6/2...<jupyter_output>HOOKED: output size torch.Size([1, 2048, 7, 7])
HOOKED: output size torch.Size([1, 2048, 7, 7])
{'fraction_non_alphanumeric': 0.1309987029831388, 'fraction_numerical': 0.04928664072632944, 'mean_word_length': 7.391304347826087, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '301108', 'license': 'MIT', 'n_tokens_mistral': 322, 'n_tokens_neox': 290, 'n_words': 57, 'path': 'weights_and_activations.ipynb', 'repo_name': 'seri-win21-circuits/clip-enrichment-circuits', 'size': '771'}