Skip to content

Instantly share code, notes, and snippets.

View r9y9's full-sized avatar
:shipit:
( ˘ω˘ ) zzz

Ryuichi Yamamoto r9y9

:shipit:
( ˘ω˘ ) zzz
View GitHub Profile
import torch
from torch import nn
torch.manual_seed(1234)
model1 = nn.Sequential(*[nn.Linear(1, 1) for _ in range(2)])
layer = nn.Linear(1, 1)
model2 = nn.Sequential(*[layer for _ in range(2)])
print("Model1 (two different linear layers):")
assert not torch.equal(model1[0].weight, model1[1].weight)
@r9y9
r9y9 / Text processing (ja) for DNN TTS.ipynb
Created November 7, 2018 03:48
Text processing (ja) for DNN TTS.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@r9y9
r9y9 / Dockerfile
Created June 13, 2018 06:09
Docker file for Tacotron2
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
git \
curl \
ca-certificates \
libjpeg-dev \
libpng-dev && \
rm -rf /var/lib/apt/lists/*
import numpy as np
import torch
import torch.nn.functional as F
import wavenet_vocoder
from nnmnkwii import preprocessing as P
from numpy import linspace, sin, pi, int16
from torch.autograd import Variable
sr = 4000
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import numpy as np
import os
from nnmnkwii.datasets import jsut
import librosa
import librosa.display
from matplotlib import pyplot as plt
from nnmnkwii.io import hts
from os.path import exists
@r9y9
r9y9 / Test jp-TTS.ipynb
Created October 10, 2017 15:00
GAN 日本語TTS
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@r9y9
r9y9 / Test Tacotoron.ipynb
Created September 14, 2017 15:26
Trying to implement Tacotron in PyTorch.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@r9y9
r9y9 / b.sh
Created September 13, 2017 07:39
cd ~/Desktop/nnmnkwii_gallery
python ./scripts/prepare_features.py ./data/NIT-ATR503/ --use_phone_alignment --question_path="./data/questions_jp.hed"