Skip to content

Instantly share code, notes, and snippets.

@gothos-folly
gothos-folly / print_tensors.py
Created June 15, 2018 07:34
Pytorch Print Tensors
import torch
import gc
def tensor_meta_data(tensor):
element_count = 1;
for dim in tensor.size():
element_count = element_count * dim
size_in_bytes = element_count * tensor.element_size()
dtype = str(tensor.dtype).replace("torch.", "")
size = str(tensor.size()).replace("torch.Size(", "").replace(")", "")
@gothos-folly
gothos-folly / 3907_OpCodes_Dec.txt
Created March 1, 2016 22:53
Tera OpCodes NA 39.07 Dawnfall
I_TELEPORT = 0
I_SPAWN_BARRACK_CHARACTER = 1
R_PLAYER_LOCATION = 2
R_TELEPORT_REPLAY_LOCATION = 3
R_CAMERA_ROTATE = 4
I_GFX_COMMAND = 17
I_GFX_ADMIN_COMMAND = 18
I_INPUT_COMMAND = 19
I_MOVE_KEY = 20
I_SKILL_KEY = 21