<jupyter_start><jupyter_text><jupyter_code>import torch as th
mat1 = th.ones([3, 3], dtype=th.float32)
mat1

cnt = 1.0
mat2 = th.zeros([3,3], dtype=th.float32)
for i in range(3):
  for j in range(3):
    mat2[i,j] = mat1[i,j]*cnt 
    cnt = cnt + 1
mat2
mat3 = (mat1 + mat2)*mat2 - mat1/mat2
mat3
mat4 = th.dot(mat2, mat3)
mat4
mat5 = th.matmul(mat2, mat3)
mat5
vec = th.tensor([1,2,3], dtype=th.float32)
vec
mat6 = th.dot(mat2, vec)
mat6
mat7 = th.matmul(mat2, vec)
mat7<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17165668662674652, 'fraction_numerical': 0.08982035928143713, 'mean_word_length': 4.456521739130435, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '528419', 'license': 'MIT', 'n_tokens_mistral': 252, 'n_tokens_neox': 245, 'n_words': 53, 'path': 'torch_example.ipynb', 'repo_name': 'choki0715/lecture', 'size': '501'}