SYMBOL INDEX (378 symbols across 25 files) FILE: diagonal_decoding.py function sample_top_k (line 5) | def sample_top_k(logits, temperature: float = 1.0, top_k: Optional[int] ... function multinomial_sample_one_no_sync (line 18) | def multinomial_sample_one_no_sync(probs_sort, dtype=torch.int): function logits_to_probs (line 26) | def logits_to_probs( function sample_top_p (line 40) | def sample_top_p(logits, temperature, top_p, vocab_size=8192): function sample_n_top_p (line 51) | def sample_n_top_p(logits, temperature, top_p, vocab_size=8192): function sample_n_top_k (line 62) | def sample_n_top_k(logits, temperature: float = 1.0, top_k: Optional[int... function logits_to_n_probs (line 73) | def logits_to_n_probs( function decode_one_token (line 87) | def decode_one_token( function decode_some_token (line 104) | def decode_some_token( function decode_n_tokens (line 121) | def decode_n_tokens( function decode_n_tokens_for_gradio (line 169) | def decode_n_tokens_for_gradio( function prefill (line 207) | def prefill( function img_diagd_prepare_inputs (line 226) | def img_diagd_prepare_inputs( function img_diagd_decode_n_tokens (line 257) | def img_diagd_decode_n_tokens( function img_diagd_prepare_inputs_for_gradio (line 353) | def img_diagd_prepare_inputs_for_gradio( function img_diagd_decode_n_token_for_gradio (line 376) | def img_diagd_decode_n_token_for_gradio( function vid_diagd_prepare_inputs (line 477) | def vid_diagd_prepare_inputs( function video_diagd_decode_n_tokens (line 518) | def video_diagd_decode_n_tokens( FILE: inference.py function token2video (line 30) | def token2video(code_list, tokenizer, save_path, fps, device = 'cuda'): function get_args (line 50) | def get_args(): function lvm_generate (line 69) | def lvm_generate(args, model, output_dir, demo_video): FILE: lvm.py function rotate_half (line 27) | def rotate_half(x): function apply_rotary_pos_emb (line 33) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids): class LlamaLVM (line 54) | class LlamaLVM(torch.nn.Module): method __init__ (line 55) | def __init__( class LlamaRMSNorm (line 67) | class LlamaRMSNorm(nn.Module): method __init__ (line 68) | def __init__(self, hidden_size, eps=1e-6): method forward (line 76) | def forward(self, hidden_states): method extra_repr (line 83) | def extra_repr(self): class LlamaRotaryEmbedding (line 86) | class LlamaRotaryEmbedding(nn.Module): method __init__ (line 87) | def __init__( method _set_cos_sin_cache (line 105) | def _set_cos_sin_cache(self, device, dtype): method forward (line 127) | def forward(self, x, seq_len=None): class LlamaMLP (line 146) | class LlamaMLP(nn.Module): method __init__ (line 147) | def __init__(self, config): method forward (line 157) | def forward(self, x): class LlamaAttention (line 161) | class LlamaAttention(nn.Module): method __init__ (line 162) | def __init__(self, config: LlamaConfig): method init_kv_cache (line 188) | def init_kv_cache(self, dtype=torch.float16): method forward (line 193) | def forward( class LlamaDecoderLayer (line 248) | class LlamaDecoderLayer(nn.Module): method __init__ (line 249) | def __init__(self, config: LlamaConfig): method forward (line 257) | def forward( class LlamaModel (line 299) | class LlamaModel(PreTrainedModel): method __init__ (line 307) | def __init__(self, config: LlamaConfig): method _create_attention_mask (line 323) | def _create_attention_mask(self, input_pos: Optional[torch.Tensor]): method forward (line 336) | def forward( class LlamaForCausalLM (line 366) | class LlamaForCausalLM(PreTrainedModel): method __init__ (line 368) | def __init__(self, config): method forward (line 375) | def forward( method refresh_kvcache (line 387) | def refresh_kvcache(self): method naive_generate (line 391) | def naive_generate(self, input_ids, max_new_tokens, temperature=1.0, a... method prefill_for_gradio (line 422) | def prefill_for_gradio(self, input_ids, temperature=1.0): method decode_img_token_for_gradio (line 435) | def decode_img_token_for_gradio(self, input_action, position_id, max_n... method diagd_img_token_for_gradio (line 452) | def diagd_img_token_for_gradio(self, input_action, position_id, max_ne... method img_diagd_generate (line 468) | def img_diagd_generate(self, input_ids, max_new_tokens, temperature=1.... method vid_diagd_generate (line 500) | def vid_diagd_generate(self, input_ids, max_new_tokens,windowsize=2, t... FILE: mcdataset.py class Buttons (line 102) | class Buttons: class QuantizationScheme (line 143) | class QuantizationScheme: class CameraQuantizer (line 150) | class CameraQuantizer: method discretize (line 183) | def discretize(self, xy): method undiscretize (line 195) | def undiscretize(self, xy): class MCDataset (line 206) | class MCDataset(torch.utils.data.Dataset): method __init__ (line 210) | def __init__(self, method json_action_to_env_action (line 225) | def json_action_to_env_action(self, json_action): method make_action_vocab (line 297) | def make_action_vocab(self, method _handle_conflict_action_index (line 325) | def _handle_conflict_action_index(self, method get_action_index_from_actiondict (line 342) | def get_action_index_from_actiondict(self, method read_jsonl (line 391) | def read_jsonl(self, jsonl_path: str): FILE: metrics/IDM/inverse_dynamics_model.py function resize_image (line 23) | def resize_image(img, target_resolution): class IDMAgent (line 36) | class IDMAgent: method __init__ (line 42) | def __init__(self, idm_net_kwargs, pi_head_kwargs, device=None): method load_weights (line 60) | def load_weights(self, path): method reset (line 65) | def reset(self): method _video_obs_to_agent (line 69) | def _video_obs_to_agent(self, video_frames): method _agent_action_to_env (line 76) | def _agent_action_to_env(self, agent_action): method predict_actions (line 89) | def predict_actions(self, video_frames): function json_action_to_env_action (line 183) | def json_action_to_env_action(json_action): function load_action_jsonl (line 233) | def load_action_jsonl(json_path): function evaluate_IDM_quality (line 242) | def evaluate_IDM_quality(model, weights,jsonl_folder, video_folder, infe... function construct_classification_labels (line 312) | def construct_classification_labels(idm_actions:dict[str, list[int]],act... function define_exclusive_classification_task (line 339) | def define_exclusive_classification_task(predicted_actions:dict,recorded... function classification_metric (line 371) | def classification_metric(pred_labels, rec_labels, class_num): function aggregate_actions (line 393) | def aggregate_actions(actions:list) -> dict: function idm_prediction (line 404) | def idm_prediction(agent, video_path,json_path, infer_demo_num, n_frames): function camera_loss (line 428) | def camera_loss(predicted_actions,recorded_actions): FILE: metrics/IDM/lib/action_head.py function fan_in_linear (line 14) | def fan_in_linear(module: nn.Module, scale=1.0, bias=True): class ActionHead (line 22) | class ActionHead(nn.Module): method forward (line 25) | def forward(self, input_data: torch.Tensor) -> Any: method logprob (line 32) | def logprob(self, action_sample: torch.Tensor, pd_params: torch.Tensor... method entropy (line 36) | def entropy(self, pd_params: torch.Tensor) -> torch.Tensor: method sample (line 40) | def sample(self, pd_params: torch.Tensor, deterministic: bool = False)... method kl_divergence (line 49) | def kl_divergence(self, params_q: torch.Tensor, params_p: torch.Tensor... class DiagGaussianActionHead (line 54) | class DiagGaussianActionHead(ActionHead): method __init__ (line 63) | def __init__(self, input_dim: int, num_dimensions: int): method reset_parameters (line 72) | def reset_parameters(self): method forward (line 76) | def forward(self, input_data: torch.Tensor, mask=None) -> torch.Tensor: method logprob (line 86) | def logprob(self, action_sample: torch.Tensor, pd_params: torch.Tensor... method entropy (line 97) | def entropy(self, pd_params: torch.Tensor) -> torch.Tensor: method sample (line 105) | def sample(self, pd_params: torch.Tensor, deterministic: bool = False)... method kl_divergence (line 114) | def kl_divergence(self, params_q: torch.Tensor, params_p: torch.Tensor... class CategoricalActionHead (line 136) | class CategoricalActionHead(ActionHead): method __init__ (line 139) | def __init__( method reset_parameters (line 157) | def reset_parameters(self): method forward (line 163) | def forward(self, input_data: torch.Tensor, mask=None) -> Any: method logprob (line 176) | def logprob(self, actions: torch.Tensor, logits: torch.Tensor) -> torc... method entropy (line 186) | def entropy(self, logits: torch.Tensor) -> torch.Tensor: method sample (line 195) | def sample(self, logits: torch.Tensor, deterministic: bool = False) ->... method kl_divergence (line 209) | def kl_divergence(self, logits_q: torch.Tensor, logits_p: torch.Tensor... class DictActionHead (line 223) | class DictActionHead(nn.ModuleDict): method reset_parameters (line 226) | def reset_parameters(self): method forward (line 230) | def forward(self, input_data: torch.Tensor, **kwargs) -> Any: method logprob (line 250) | def logprob(self, actions: torch.Tensor, logits: torch.Tensor) -> torc... method sample (line 253) | def sample(self, logits: torch.Tensor, deterministic: bool = False) ->... method entropy (line 256) | def entropy(self, logits: torch.Tensor) -> torch.Tensor: method kl_divergence (line 259) | def kl_divergence(self, logits_q: torch.Tensor, logits_p: torch.Tensor... function make_action_head (line 263) | def make_action_head(ac_space: ValType, pi_out_size: int, temperature: f... FILE: metrics/IDM/lib/action_mapping.py class ActionMapping (line 12) | class ActionMapping(abc.ABC): method __init__ (line 30) | def __init__(self, n_camera_bins: int = 11): method from_factored (line 42) | def from_factored(self, ac: Dict) -> Dict: method to_factored (line 50) | def to_factored(self, ac: Dict) -> Dict: method get_action_space_update (line 58) | def get_action_space_update(self): method get_zero_action (line 63) | def get_zero_action(self): method factored_buttons_to_groups (line 67) | def factored_buttons_to_groups(self, ac_buttons: np.ndarray, button_gr... class IDMActionMapping (line 102) | class IDMActionMapping(ActionMapping): method from_factored (line 104) | def from_factored(self, ac: Dict) -> Dict: method to_factored (line 107) | def to_factored(self, ac: Dict) -> Dict: method get_action_space_update (line 110) | def get_action_space_update(self): method get_zero_action (line 117) | def get_zero_action(self): class CameraHierarchicalMapping (line 120) | class CameraHierarchicalMapping(ActionMapping): method __init__ (line 134) | def __init__(self, *args, **kwargs): method _precompute_to_factored (line 151) | def _precompute_to_factored(self): method from_factored (line 179) | def from_factored(self, ac: Dict) -> Dict: method to_factored (line 215) | def to_factored(self, ac: Dict) -> Dict: method get_action_space_update (line 227) | def get_action_space_update(self): method get_zero_action (line 233) | def get_zero_action(self): FILE: metrics/IDM/lib/actions.py class Buttons (line 8) | class Buttons: class SyntheticButtons (line 36) | class SyntheticButtons: class QuantizationScheme (line 43) | class QuantizationScheme: class CameraQuantizer (line 49) | class CameraQuantizer: method discretize (line 82) | def discretize(self, xy): method undiscretize (line 94) | def undiscretize(self, xy): class ActionTransformer (line 105) | class ActionTransformer: method __init__ (line 109) | def __init__( method camera_zero_bin (line 123) | def camera_zero_bin(self): method discretize_camera (line 126) | def discretize_camera(self, xy): method undiscretize_camera (line 129) | def undiscretize_camera(self, pq): method item_embed_id_to_name (line 132) | def item_embed_id_to_name(self, item_id): method dict_to_numpy (line 135) | def dict_to_numpy(self, acs): method numpy_to_dict (line 154) | def numpy_to_dict(self, acs): method policy2env (line 167) | def policy2env(self, acs): method env2policy (line 171) | def env2policy(self, acs): FILE: metrics/IDM/lib/impala_cnn.py class CnnBasicBlock (line 13) | class CnnBasicBlock(nn.Module): method __init__ (line 20) | def __init__( method forward (line 50) | def forward(self, x): class CnnDownStack (line 55) | class CnnDownStack(nn.Module): method __init__ (line 69) | def __init__( method forward (line 114) | def forward(self, x): method output_shape (line 123) | def output_shape(self, inshape): class ImpalaCNN (line 132) | class ImpalaCNN(nn.Module): method __init__ (line 148) | def __init__( method forward (line 187) | def forward(self, x): FILE: metrics/IDM/lib/masked_attention.py function get_band_diagonal_mask (line 12) | def get_band_diagonal_mask(t: int, T: int, maxlen: int, batchsize: int, ... function get_mask (line 47) | def get_mask(first_b11: th.Tensor, state_mask: th.Tensor, t: int, T: int... class MaskedAttention (line 97) | class MaskedAttention(nn.Module): method __init__ (line 120) | def __init__( method initial_state (line 153) | def initial_state(self, batchsize: int, device=None): method forward (line 161) | def forward(self, input_bte, first_bt, state): method get_log_keys (line 180) | def get_log_keys(self): FILE: metrics/IDM/lib/minecraft_util.py function store_args (line 12) | def store_args(method): function get_norm_entropy_from_cat_head (line 37) | def get_norm_entropy_from_cat_head(module, name, masks, logits): function get_norm_cat_entropy (line 62) | def get_norm_cat_entropy(module, masks, logits, template) -> Tuple[torch... function get_diag_guassian_entropy (line 77) | def get_diag_guassian_entropy(module, logits, template) -> Optional[torc... FILE: metrics/IDM/lib/misc.py function intprod (line 5) | def intprod(xs): function safezip (line 15) | def safezip(*args): function transpose (line 26) | def transpose(x, before, after): function transpose_undo (line 37) | def transpose_undo(x, before, after, *, undo=None): function compose_undo (line 50) | def compose_undo(u1, u2): function _parse_reshape_str (line 66) | def _parse_reshape_str(s, kind): function _infer_part (line 82) | def _infer_part(part, concrete_dim, known, index, full_shape): function _infer_step (line 122) | def _infer_step(args): function _infer (line 135) | def _infer(known, desc, shape): function fixed_point (line 142) | def fixed_point(f, x, eq=None): function _infer_question_mark (line 153) | def _infer_question_mark(x, total_product): function _ground (line 172) | def _ground(x, known, infer_question_mark_with=None): function _handle_ellipsis (line 181) | def _handle_ellipsis(x, before, after): function reshape_undo (line 201) | def reshape_undo(inp, before, after, *, undo=None, known=None, **kwargs): function reshape (line 246) | def reshape(*args, **kwargs): function product (line 254) | def product(xs, one=1): function exact_div (line 261) | def exact_div(a, b): FILE: metrics/IDM/lib/mlp.py class MLP (line 8) | class MLP(nn.Module): method __init__ (line 9) | def __init__(self, insize, nhidlayer, outsize, hidsize, hidactiv, dtyp... method forward (line 21) | def forward(self, x): method output_shape (line 30) | def output_shape(self): FILE: metrics/IDM/lib/normalize_ewma.py class NormalizeEwma (line 6) | class NormalizeEwma(nn.Module): method __init__ (line 9) | def __init__(self, input_shape, norm_axes=2, beta=0.99999, per_element... method reset_parameters (line 22) | def reset_parameters(self): method running_mean_var (line 27) | def running_mean_var(self): method forward (line 33) | def forward(self, input_vector): method denormalize (line 57) | def denormalize(self, input_vector): FILE: metrics/IDM/lib/policy.py class ImgPreprocessing (line 21) | class ImgPreprocessing(nn.Module): method __init__ (line 29) | def __init__(self, img_statistics: Optional[str] = None, scale_img: bo... method forward (line 39) | def forward(self, img): class ImgObsProcess (line 48) | class ImgObsProcess(nn.Module): method __init__ (line 57) | def __init__( method forward (line 79) | def forward(self, img): class MinecraftPolicy (line 83) | class MinecraftPolicy(nn.Module): method __init__ (line 96) | def __init__( method output_latent_size (line 190) | def output_latent_size(self): method forward (line 193) | def forward(self, ob, state_in, context): method initial_state (line 220) | def initial_state(self, batchsize): class MinecraftAgentPolicy (line 227) | class MinecraftAgentPolicy(nn.Module): method __init__ (line 228) | def __init__(self, action_space, policy_kwargs, pi_head_kwargs): method make_value_head (line 237) | def make_value_head(self, v_out_size: int, norm_type: str = "ewma", no... method make_action_head (line 240) | def make_action_head(self, pi_out_size: int, **pi_head_opts): method initial_state (line 243) | def initial_state(self, batch_size: int): method reset_parameters (line 246) | def reset_parameters(self): method forward (line 252) | def forward(self, obs, first: th.Tensor, state_in): method get_logprob_of_action (line 271) | def get_logprob_of_action(self, pd, action): method get_kl_of_action_dists (line 281) | def get_kl_of_action_dists(self, pd1, pd2): method get_output_for_observation (line 287) | def get_output_for_observation(self, obs, state_in, first): method act (line 308) | def act(self, obs, first, state_in, stochastic: bool = True, taken_act... method v (line 331) | def v(self, obs, first, state_in): class InverseActionNet (line 342) | class InverseActionNet(MinecraftPolicy): method __init__ (line 348) | def __init__( method forward (line 374) | def forward(self, ob, state_in, context): method _conv3d_forward (line 394) | def _conv3d_forward(self, x): class InverseActionPolicy (line 406) | class InverseActionPolicy(nn.Module): method __init__ (line 407) | def __init__( method make_action_head (line 424) | def make_action_head(self, **kwargs): method reset_parameters (line 427) | def reset_parameters(self): method forward (line 432) | def forward(self, obs, first: th.Tensor, state_in, **kwargs): method predict (line 449) | def predict( method initial_state (line 466) | def initial_state(self, batch_size: int): FILE: metrics/IDM/lib/scaled_mse_head.py class ScaledMSEHead (line 11) | class ScaledMSEHead(nn.Module): method __init__ (line 16) | def __init__( method reset_parameters (line 29) | def reset_parameters(self): method forward (line 34) | def forward(self, input_data): method loss (line 37) | def loss(self, prediction, target): method denormalize (line 45) | def denormalize(self, input_data): method normalize (line 49) | def normalize(self, input_data): FILE: metrics/IDM/lib/torch_util.py function contextmanager_to_decorator (line 23) | def contextmanager_to_decorator(cm): function have_cuda (line 35) | def have_cuda(): function default_device_type (line 39) | def default_device_type(): function set_default_torch_device (line 47) | def set_default_torch_device(device): function dev (line 52) | def dev(): function zeros (line 56) | def zeros(*args, **kwargs): function ones (line 60) | def ones(*args, **kwargs): function arange (line 64) | def arange(*args, **kwargs): function NormedLinear (line 68) | def NormedLinear(*args, scale=1.0, dtype=th.float32, **kwargs): class LinearF16 (line 85) | class LinearF16(nn.Linear): method forward (line 86) | def forward(self, x): class LayerNormF16 (line 90) | class LayerNormF16(nn.LayerNorm): method forward (line 91) | def forward(self, x): function LayerNorm (line 95) | def LayerNorm(*args, dtype=th.float32, **kwargs): function flatten_image (line 107) | def flatten_image(x): function sequential (line 115) | def sequential(layers, x, *args, diag_name=None, use_checkpoint=False): function load_average_with_metadata (line 122) | def load_average_with_metadata(paths, overrides): function save_kwargs (line 135) | def save_kwargs(fn): function parse_dtype (line 156) | def parse_dtype(x): function index (line 184) | def index(x, i): FILE: metrics/IDM/lib/tree_util.py function unzip2 (line 25) | def unzip2(xys): function partial (line 34) | def partial(fun, *args, **kwargs): function safe_zip (line 41) | def safe_zip(*args: Collection) -> List[tuple]: function safe_map (line 48) | def safe_map(f, *args): function tree_map (line 56) | def tree_map(f, tree, treat_as_leaves: Optional[List] = None): function tree_multimap (line 79) | def tree_multimap(f, tree, *rest, treat_as_leaves: Optional[List] = None): function prefix_multimap (line 113) | def prefix_multimap(f, treedef, tree, *rest): function walk_pytree (line 136) | def walk_pytree(f_node, f_leaf, tree, treat_as_leaves: Optional[List] = ... function build_tree (line 150) | def build_tree(treedef, xs): function _tree_unflatten (line 159) | def _tree_unflatten(xs, treedef): function _num_leaves (line 167) | def _num_leaves(treedef): function _nested_treedef (line 171) | def _nested_treedef(inner, outer): class PyTreeDef (line 180) | class PyTreeDef(object): method __init__ (line 181) | def __init__(self, node_type, node_data, children): method __repr__ (line 186) | def __repr__(self): method __hash__ (line 194) | def __hash__(self): method __eq__ (line 197) | def __eq__(self, other): method __ne__ (line 203) | def __ne__(self, other): class PyLeaf (line 207) | class PyLeaf(object): method __repr__ (line 208) | def __repr__(self): method __eq__ (line 211) | def __eq__(self, other): class NodeType (line 215) | class NodeType(object): method __init__ (line 216) | def __init__(self, name, to_iterable, from_iterable): function register_pytree_node (line 225) | def register_pytree_node(py_type, to_iterable, from_iterable): function tuple_to_iterable (line 230) | def tuple_to_iterable(xs): function tuple_from_iterable (line 234) | def tuple_from_iterable(_keys, xs): function list_to_iterable (line 238) | def list_to_iterable(xs): function list_from_iterable (line 242) | def list_from_iterable(_keys, xs): function dict_to_iterable (line 246) | def dict_to_iterable(xs): function dict_from_iterable (line 251) | def dict_from_iterable(keys, xs): function ordered_dict_from_iterable (line 255) | def ordered_dict_from_iterable(keys, xs): function default_dict_to_iterable (line 259) | def default_dict_to_iterable(xs): function default_dict_from_iterable (line 263) | def default_dict_from_iterable(keys, xs): function none_to_iterable (line 267) | def none_to_iterable(_xs): function none_from_iterable (line 271) | def none_from_iterable(_keys, _xs): FILE: metrics/IDM/lib/util.py function get_module_log_keys_recursive (line 13) | def get_module_log_keys_recursive(m: nn.Module): class FanInInitReLULayer (line 23) | class FanInInitReLULayer(nn.Module): method __init__ (line 38) | def __init__( method forward (line 75) | def forward(self, x): method get_log_keys (line 84) | def get_log_keys(self): class ResidualRecurrentBlocks (line 91) | class ResidualRecurrentBlocks(nn.Module): method __init__ (line 93) | def __init__( method forward (line 115) | def forward(self, x, first, state): method initial_state (line 125) | def initial_state(self, batchsize): class ResidualRecurrentBlock (line 132) | class ResidualRecurrentBlock(nn.Module): method __init__ (line 134) | def __init__( method forward (line 193) | def forward(self, x, first, state): function recurrent_forward (line 214) | def recurrent_forward(module, x, first, state, reverse_lstm=False): function _banded_repeat (line 232) | def _banded_repeat(x, t): function bandify (line 250) | def bandify(b_nd, t, T): function get_norm (line 270) | def get_norm(name, d, dtype=th.float32): FILE: metrics/IDM/lib/xf.py function attention (line 18) | def attention( class Attn (line 74) | class Attn: method __init__ (line 85) | def __init__(self, mask, maxlen): method preproc_qkv (line 89) | def preproc_qkv(self, Q_bte, K_bte, V_bte): method preproc_r (line 92) | def preproc_r(self, R_btn): function split_heads (line 96) | def split_heads(x_bte, h): class All2All (line 106) | class All2All(Attn): method __init__ (line 107) | def __init__(self, nhead, maxlen, mask=True, head_dim=None): method preproc_qkv (line 113) | def preproc_qkv(self, *xs): method preproc_r (line 121) | def preproc_r(self, R_btn): method postproc_a (line 125) | def postproc_a(self, A_Btq, h): function _required_padding (line 134) | def _required_padding(dim, target_div): class StridedAttn (line 141) | class StridedAttn(Attn): method __init__ (line 142) | def __init__(self, nhead, stride, maxlen, mask=True): method _preproc (line 147) | def _preproc(self, x, name, Q_t=None, Q_pad=None): method preproc_qkv (line 188) | def preproc_qkv(self, Q_bte, K_bte, V_bte): method preproc_r (line 214) | def preproc_r(self, R_bte): class AttentionLayerBase (line 229) | class AttentionLayerBase(nn.Module): method __init__ (line 230) | def __init__( method relattn_logits (line 265) | def relattn_logits(self, X_bte, T): function quick_gelu (line 274) | def quick_gelu(x): function act (line 278) | def act(actname, x): class SelfAttentionLayer (line 289) | class SelfAttentionLayer(AttentionLayerBase): method __init__ (line 296) | def __init__( method residual (line 334) | def residual(self, X_bte, state): method forward (line 358) | def forward(self, X_bte, state): method stateless_forward (line 362) | def stateless_forward(self, X_bte): method update_state (line 366) | def update_state(self, state, K_bte, V_bte): method initial_state (line 393) | def initial_state(self, batchsize, initial_T=0): method empty_state (line 399) | def empty_state(self): class PointwiseLayer (line 403) | class PointwiseLayer(nn.Module): method __init__ (line 408) | def __init__(self, x_size, scale, dtype, norm, actname="relu", mlp_rat... method residual (line 423) | def residual(self, x): method forward (line 428) | def forward(self, x): function _is_separate (line 432) | def _is_separate(sep, name): function make_maybe_multiscale (line 443) | def make_maybe_multiscale(make_fn, *args, seqlens, separate, name, **kwa... class SplitCallJoin (line 457) | class SplitCallJoin(nn.Module): method __init__ (line 458) | def __init__(self, mods, seqlens): method forward (line 463) | def forward(self, x): FILE: metrics/common_metrics.py function load_videos_to_tensor (line 16) | def load_videos_to_tensor(video_dir, number_of_videos, video_length, cha... function main (line 58) | def main(): FILE: metrics/tabulate_all_results.py function tabluate_metrics (line 9) | def tabluate_metrics(input_dir,output_path): FILE: mineworld.py class Buttons (line 20) | class Buttons: function get_args (line 167) | def get_args(): function make_action_dict (line 178) | def make_action_dict(action_line): function stack_images (line 189) | def stack_images(imgs): function get_action_line (line 196) | def get_action_line(acts): function run_prediction (line 206) | def run_prediction(btns_choices, cam_x_input, cam_y_input): function run_prediction_n_times (line 251) | def run_prediction_n_times(n, btns_1, btns_2, btns_3, btns_4, btns_5, ca... function step_pred_source_video_right (line 262) | def step_pred_source_video_right(video_path, start): function on_download_button_click (line 269) | def on_download_button_click(fps=6): function cleanup_files (line 295) | def cleanup_files(): function step_video (line 305) | def step_video(video_path, start_frame, frame_count): FILE: utils.py function print0 (line 8) | def print0(*args, **kwargs): function tensor_to_uint8 (line 11) | def tensor_to_uint8(tensor): function get_obj_from_str (line 17) | def get_obj_from_str(string, reload=False): function instantiate_from_config (line 24) | def instantiate_from_config(config): function load_model_from_config (line 29) | def load_model_from_config(config, sd, gpu=True, eval_mode=True): function get_valid_dirs (line 41) | def get_valid_dirs(dir1: str, dir2: Union[None, str] = None, dir3: Union... function get_valid_paths (line 47) | def get_valid_paths(path1: str, path2: Union[None, str] = None, path3: U... function load_model (line 53) | def load_model(config, ckpt, gpu, eval_mode): FILE: vae.py class VAE (line 8) | class VAE(nn.Module): method __init__ (line 9) | def __init__(self, method init_from_ckpt (line 22) | def init_from_ckpt( method tokenize_images (line 46) | def tokenize_images(self, x: torch.Tensor, sane_index_shape: bool = Tr... method token2image (line 59) | def token2image(self, tokens):