<jupyter_start><jupyter_text>Manually construct the mask to be used at the last layer of the VAE output to allow hits of only true PMT<jupyter_code>import torch<jupyter_output><empty_output><jupyter_text>First construct a 2d mask and then find how to broadcast to 3d tensor of size $40 \times 40 \times 19$<jupyter_code>mask = torch.zeros(4, 4)
print(mask)
scattered_mask = mask.scatter(1, torch.LongTensor([[1, 2], [0, 1, 2, 3], [2, 3], [2, 3]]), 1.)
print(scattered_mask)
scattered_mask_2 = scattered_mask.scatter(0, torch.LongTensor([[0], [1], [2], [3]]), 1.)
print(scattered_mask_2)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.137987012987013, 'fraction_numerical': 0.048701298701298704, 'mean_word_length': 6.7125, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '130733', 'license': 'CNRI-Python', 'n_tokens_mistral': 249, 'n_tokens_neox': 231, 'n_words': 68, 'path': 'notebooks/2910 - Constructing full tank mask.ipynb', 'repo_name': 'WatChMaL/CNN', 'size': '616'}