This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" | |
if not (vim.uv or vim.loop).fs_stat(lazypath) then | |
local lazyrepo = "https://github.com/folke/lazy.nvim.git" | |
vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) | |
end | |
vim.opt.rtp:prepend(lazypath) | |
require("lazy").setup({ | |
spec = { | |
{ "williamboman/mason.nvim" }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Space efficient save and load of depth maps | |
""" | |
from ctypes import c_ubyte, c_float | |
import numpy as np | |
from imageio.v3 import imread, imwrite | |
def depth_encode(dmap): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Running DDP training on rank 1. | |
Running DDP training on rank 0. | |
0%| | 0/1000 [00:00<?, ?it/s] | |
0%| | 0/1000 [00:00<?, ?it/s][2022-12-14 10:11:05,736] torch._dynamo.eval_frame: [DEBUG] skipping __init__ /users/eldar/apps/anaconda3/envs/ca3d/lib/python3.10/contextlib.py | |
[2022-12-14 10:11:05,736] torch._dynamo.eval_frame: [DEBUG] skipping __enter__ /users/eldar/apps/anaconda3/envs/ca3d/lib/python3.10/contextlib.py | |
[2022-12-14 10:11:05,736] torch._dynamo.eval_frame: [DEBUG] skipping __init__ /users/eldar/apps/anaconda3/envs/ca3d/lib/python3.10/contextlib.py | |
[2022-12-14 10:11:05,736] torch._dynamo.eval_frame: [DEBUG] skipping __enter__ /users/eldar/apps/anaconda3/envs/ca3d/lib/python3.10/contextlib.py | |
[2022-12-14 10:11:05,736] torch._dynamo.eval_frame: [DEBUG] skipping enable_dynamic /users/eldar/apps/anaconda3/envs/ca3d/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py | |
[2022-12-14 10:11:05,736] torch._dynamo.eval_frame: [DEBUG] skipping forward /users/eldar/apps/anaconda3/envs/ca3d/li |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Running DDP training on rank 1. | |
Running DDP training on rank 0. | |
r.device before call: cuda:1 rank: 1 | |
r.device inside call: cuda:0 rank: 1 | |
[W reducer.cpp:1298] Warning: find_unused_parameters=True was specified in DDP constructor, but did not find any unused parameters in the forward pass. This flag results in an extra traversal of the autograd graph every iteration, which can adversely affect performance. If your model indeed never has any unused parameters in the forward pass, consider turning this flag off. Note that this warning may be a false positive if your model has flow control causing later iterations to have unused parameters. (function operator()) | |
Traceback (most recent call last): | |
File "/users/eldar/src/hybridrf/train_dynamo_bug.py", line 77, in <module> mp.spawn(train, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pathlib import Path | |
import re | |
import argparse | |
import imageio | |
import numpy as np | |
from tqdm import tqdm | |
def crop_or_pad(img, crop): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Tuple | |
import torch | |
from pytorch3d.common.linear_with_repeat import LinearWithRepeat | |
from pytorch3d.renderer import HarmonicEmbedding, ray_bundle_to_ray_points, RayBundle | |
def _xavier_init(linear): | |
""" | |
Performs the Xavier weight initialization of the linear layer `linear`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib import collections | |
from matplotlib import colors as mcolors | |
# F: 3x3 fundamental matrix maps points in image I1 to epipolar lines in image I2 | |
# F = (K2^T)^-1 * E * K1^-1 | |
# E = R [t]_x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ConfConverter: | |
def __init__(self, filename): | |
self.filename = filename | |
self.f = open(filename, "w") | |
def __del__(self): | |
self.f.close() | |
def add_argument(self, name, type=None, default=None, required=None, choices=[], help="", nargs=None, action=None): | |
f = self.f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime as dt | |
import tensorflow as tf | |
import tensorflow.contrib.slim as slim | |
from tensorflow.contrib.slim.nets import resnet_v1 | |
import threading | |
from PoseDataset import PoseDataset | |
from TrainParams import TrainParams |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ldc.JIT; | |
void main() | |
{ | |
Compiler compiler = new Compiler(); | |
compiler.importPaths = [ "/home/eldar/ldc/druntime/import", | |
"/home/eldar/mylib/" ]; | |
compiler.emitModuleInfo = false; | |
Module mod = compiler.compile("extern(C) int helloWorld() { return 15; }"); |