I hereby claim:
- I am currymj on github.
- I am curry (https://keybase.io/curry) on keybase.
- I have a public key ASAYThi4MBMaHHY_sPaY-F7foTp5G-eJVMhn38np7nAtYgo
To claim this, I am signing this object:
import jax.numpy as jnp | |
from jax import grad, hessian, jit | |
from jax.scipy.linalg import solve | |
import numpy as np | |
import matplotlib.pyplot as plt | |
# The goal here is to solve a Stackelberg game in a particularly grotesque way. | |
# To compute the follower best response, we take a few Newton steps using autograd to compute the Hessian and gradients. | |
# This is implemented in function `follower_bestresponse`. |
#!/bin/bash | |
#SBATCH --ntasks 2 | |
#SBATCH -N 2 | |
#SBATCH --job-name=distributed-pbg | |
#SBATCH -o log-gloo-test-%j.out | |
source /etc/profile | |
export HDF5_USE_FILE_LOCKING='FALSE' | |
export PARENT=`/bin/hostname -s` |
In file included from ../caffe2/operators/batch_matmul_op.h:11:0, | |
from ../caffe2/operators/batch_matmul_op_test.cc:6: | |
../caffe2/core/operator.h: In member function 'std::vector<_RealType> caffe2::OperatorBase::GetVectorFromIValueList(const c10::IValue&) const': | |
../caffe2/core/operator.h:129:47: error: parse error in template argument list | |
return c10::impl::toVector(value.template to<List<T>>()); | |
^ | |
../caffe2/core/operator.h: In instantiation of 'std::vector<_RealType> caffe2::OperatorBase::GetVectorFromIValueList(const c10::IValue&) const [with T = long int]': | |
../caffe2/core/operator.h:818:52: required from here | |
../caffe2/core/operator.h:129:31: error: no matching function for call to 'c10::IValue::to() const' | |
return c10::impl::toVector(value.template to<List<T>>()); |
function genlist() | |
arr = zeros(32768) | |
for i=1:length(arr) | |
arr[i] = rand(Int) % 256 | |
end | |
arr | |
end | |
function processlist(arr) | |
sum = 0 |
using DifferentialEquations | |
using DiffEqBayes | |
using Distributions | |
const p0 = 0.2; const q0 = 0.3; const v0 = 1; const d0 = 5 | |
const p1 = 0.2; const q1 = 0.3; const v1 = 1; const d1 = 1 | |
const d2 = 1; const beta0 = 1; const beta1 = 1; #const tau = 1 | |
function bc_model(du,u,h,p,t) | |
du[1] = (v0/(1+beta0*(h(p, t-p[1])[3]^2))) * (p0 - q0)*u[1] - d0*u[1] | |
du[2] = (v0/(1+beta0*(h(p, t-p[1])[3]^2))) * (1 - p0 + q0)*u[1] + |
using Distributions | |
using Plots | |
using StatsFuns | |
# function from Kandasamy et al | |
# each Fd is trimodal | |
struct Fd <: Function | |
d::Int64 | |
v1::Vector{Float64} |
with import <nixpkgs> {}; | |
let ps = pkgs.python3Packages; | |
in | |
(python3.buildEnv.override { | |
extraLibs = [ | |
ps.numpy | |
ps.toolz | |
ps.notebook | |
ps.matplotlib |
(bayesopt) Michaels-MacBook-Pro-2:release_pre_alpha curry$ python run_stybtang_transform.py | |
[array([2, 4, 9]), array([8]), array([6, 7, 5]), array([1, 3, 0])] | |
Running Multi MCMC model selection BO on rotated Stybtang | |
12.3249773332 | |
141.004751431 | |
/Users/curry/src/GPy/GPy/kern/src/rbf.py:43: RuntimeWarning:overflow encountered in square | |
/Users/curry/src/GPy/GPy/kern/src/stationary.py:167: RuntimeWarning:overflow encountered in divide | |
/Users/curry/src/GPy/GPy/kern/src/rbf.py:46: RuntimeWarning:invalid value encountered in multiply | |
/Users/curry/anaconda3/envs/bayesopt/lib/python2.7/site-packages/paramz/transformations.py:108: RuntimeWarning:invalid value encountered in greater | |
/Users/curry/anaconda3/envs/bayesopt/lib/python2.7/site-packages/paramz/transformations.py:113: RuntimeWarning:invalid value encountered in greater |
I hereby claim:
To claim this, I am signing this object:
import tensorflow as tf | |
import numpy as np | |
def backward_tf(transition, emission, initial_state, seq): | |
beta = tf.ones_like(transition[:,-1]) | |
jrange = tf.reverse(tf.range(1,seq.get_shape()[0]),[0]) | |
def scan_op(curr_beta, j): | |
return tf.reduce_sum( emission[:,seq[j]] * transition * curr_beta,1) | |
betas = tf.scan(scan_op, jrange, initializer=beta) | |
final_beta = initial_state * betas[-1,:] * emission[:,seq[0]] |