View train_matrix_exp_estim.jl
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
using SimpleChains | |
function f(x) | |
N = Base.isqrt(length(x)) | |
A = reshape(view(x, 1:N*N), (N,N)) | |
expA = exp(A) | |
vec(expA) | |
end | |
T = Float32; | |
D = 2 # 2x2 matrices |
View train_matrix_exponential_tcnn.py
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
# install tinycudann via | |
# pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch | |
import torch | |
import tinycudann as tcnn | |
import time | |
class TCNNMatrixExponentEstimator1(torch.nn.Module): | |
def __init__(self, hidden=16) -> None: | |
super().__init__() |
View stresstest_jax_dlpack.jl
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
using PyCall | |
using CUDA | |
using DLPack | |
using Test | |
#using Zygote | |
#using ChainRulesCore | |
@show DLPack.PYCALL_NOOP_DELETER | |
jax = pyimport("jax") |
View stresstest_dlpack.jl
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
using PyCall | |
using DLPack | |
using Test | |
using Zygote | |
using ChainRulesCore | |
torch = pyimport("torch") | |
functorch = pyimport("functorch") | |
dlpack = pyimport("torch.utils.dlpack") | |
py""" |
View debug_nested.jl
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
using Flux | |
qdim = 2 | |
nn = Chain(Dense(qdim, 32, tanh), Dense(32, 2)); | |
q = rand(2, 5); | |
function jac(x) | |
o = nn(x) | |
return reduce(hcat, [o[:, i] for i in 1:size(x)[end]]) | |
end |
View test_dircol.py
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
#!/usr/bin/env python3 | |
# | |
# File: test_dircol.py | |
# | |
import numpy as np | |
import torch | |
from optimalcontrol.dircolproblem import DIRCOLProblem | |
from mechamodlearn import utils |
View segfault_mujoco.jl
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
using MuJoCo | |
modelfile = "test/humanoid.xml" | |
pm = mj_loadXML(modelfile) # Raw C pointer to mjModel | |
pd = mj_makeData(pm) # Raw C pointer to mjData | |
m, d = mj.mapmujoco(pm, pd) # wrap with our jlModel, jlData types | |
# we can manipulate data in the raw C structs now | |
nq = mj.get(m, :nq) |
View notebook.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View bold_symbols.tex
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
\newcommand{\ba}{\mathbf{a}} | |
\newcommand{\bb}{\mathbf{b}} | |
\newcommand{\bc}{\mathbf{c}} | |
\newcommand{\bd}{\mathbf{d}} | |
\newcommand{\be}{\mathbf{e}} | |
\newcommand{\bg}{\mathbf{g}} | |
\newcommand{\bh}{\mathbf{h}} | |
\newcommand{\bi}{\mathbf{i}} | |
\newcommand{\bj}{\mathbf{j}} | |
\newcommand{\bk}{\mathbf{k}} |
View simple_multiwalker_spec.yaml
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
agents: | |
- idx: 0 | |
status: 1 | |
rate: 1.0 | |
learner: | |
cls: SharedFFA3CLearner | |
lidx: 0 | |
- idx: 1 | |
status: 1 | |
rate: 1.0 |
NewerOlder