Skip to content

Instantly share code, notes, and snippets.

View mitmul's full-sized avatar

Shunta Saito mitmul

View GitHub Profile
@mitmul
mitmul / init.sh
Last active October 23, 2024 04:33
#!/usr/bin/env bash
# Setup oh-my-zsh
if [ ! -d ~/.oh-my-zsh ]; then
yes n | sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
fi
# Setup tmux
curl -L https://gist.github.com/mitmul/bd25b9630177bdb0b5d2da5a5251b883/raw/tmux.conf -o ~/.tmux.conf
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 2章 基礎的な数学(微分、線形代数、統計)\n",
"\n",
"本章では、ディープラーニングを含めた機械学習に必要な数学の基礎である「微分」「線形代数」「確率・統計」の3つについて、簡潔に紹介していきます。"
]
@mitmul
mitmul / Dockerfile
Created October 3, 2018 20:08
ONNX-Chainer Dockerfile to test the ONNX
FROM ubuntu:16.04
MAINTAINER Shunta Saito <[email protected]>
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cmake \
curl \
wget \
git \
# Modified work:
# -----------------------------------------------------------------------------
# Copyright (c) 2018 Preferred Infrastructure, Inc.
# Copyright (c) 2018 Preferred Networks, Inc.
# -----------------------------------------------------------------------------
# Original work:
# -----------------------------------------------------------------------------
# Copyright (c) 2015 by Contributors
# \file roi_pooling.cu
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import collections
import os
import shutil
import numpy as np
import pandas as pd
import chainer
import chainer.functions as F
import chainer.links as L
class ConvLSTM(chainer.Chain):
# Conv2D = EqualizedConv2D
Conv2D = L.Convolution2D
docker build -t mitmul/repro:cupy-issue-1222 .
nvidia-docker run --rm \
-v $PWD:/root \
-ti mitmul/repro:cupy-issue-1222 \
python3 train.py
(gdb) bt
#0 0x0000000000000007 in ?? ()
#1 0x00007fffccf8c116 in google::protobuf::MessageLite::AppendToString(std::string*) const ()
from /home/ubuntu/miniconda/lib/libprotobuf.so.14
#2 0x00007fffccf8c472 in google::protobuf::MessageLite::SerializeAsString() const ()
from /home/ubuntu/miniconda/lib/libprotobuf.so.14
#3 0x00007fffcd5d613c in tc::ExecutionEngine::getHandle(std::string const&, std::vector<DLTensor const*, std::allocator<DLTensor const*> > const&, tc::MappingOptions const&)::{lambda(std::unique_ptr<tc::ExecutionEngine::ExecutorInfo, std::default_delete<tc::ExecutionEngine::ExecutorInfo> > const&)#1}::operator()(std::unique_ptr<tc::ExecutionEngine::ExecutorInfo, std::default_delete<tc::ExecutionEngine::ExecutorInfo> > const&) const () from /home/ubuntu/miniconda/lib/libtc_core.so
#4 0x00007fffcd5d63d7 in tc::ExecutionEngine::getHandle(std::string const&, std::vector<DLTensor const*, std::allocator<DLTensor const*> > const&, tc::MappingOptions const&) ()
from /home/ubuntu/miniconda/l
#!/bin/sh
# Install CUDA driver and CUDA
CUDA_REPO_PKG=cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
wget -O /tmp/${CUDA_REPO_PKG} http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/${CUDA_REPO_PKG}
sudo dpkg -i /tmp/${CUDA_REPO_PKG}
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
rm -f /tmp/${CUDA_REPO_PKG}
sudo apt-get update
sudo apt-get install -y cuda-drivers
@mitmul
mitmul / az_utils.py
Last active February 19, 2018 01:03
#!/usr/bin/env python
# # -*- coding: utf-8 -*-
import argparse
import json
import re
import subprocess
RESOURCE_GROUP = ''
IMAGE_NAME = ''