Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View jojonki's full-sized avatar

Junki Ohmura jojonki

View GitHub Profile
@W4ngatang
W4ngatang / download_glue_data.py
Last active April 16, 2024 06:10
Script for downloading data of the GLUE benchmark (gluebenchmark.com)
''' Script for downloading all GLUE data.
Note: for legal reasons, we are unable to host MRPC.
You can either use the version hosted by the SentEval team, which is already tokenized,
or you can download the original data from (https://download.microsoft.com/download/D/4/6/D46FF87A-F6B9-4252-AA8B-3604ED519838/MSRParaphraseCorpus.msi) and extract the data from it manually.
For Windows users, you can run the .msi file. For Mac and Linux users, consider an external library such as 'cabextract' (see below for an example).
You should then rename and place specific files in a folder (see below for an example).
mkdir MRPC
cabextract MSRParaphraseCorpus.msi -d MRPC
@tosaka2
tosaka2 / dnn_tts_survey.md
Last active December 23, 2020 17:45
DNNを用いたTTS手法の調査

TTSについて

以下の図がよくまとまっている。[1]
TTSの図

モデルによって音声合成の中でどこまでの仕事を担当しているかが異なる。  


DNNを用いないボコーダー

@czs0x55aa
czs0x55aa / print_model_parameters.py
Created September 12, 2017 14:08
print model parameters in pytorch
for name, param in model.state_dict().items():
print(name, param.size())
@voluntas
voluntas / gae_go.rst
Last active March 15, 2019 16:31
GAE/Go コトハジメ

GAE/Go コトハジメ

日時

2017-07-21

@voluntas

バージョン

0.6.0

URL

https://voluntas.githu.io/

突っ込みは Twitter @voluntas まで。

@GINK03
GINK03 / keras-seq2seq.md
Last active December 27, 2019 01:41
keras-seq2seq.md

KerasでSeq2Seqをやる

KerasでSeq2Seq

Seq2Seqといえば、TensorFlowでの実装が有名で、英語とフランス語の大規模コーパスを使ってやるものが、よくチューニングされており便利です
しかし、この翻訳のタスクに最適化されており、一般的なものと言い難い感じで任意のタスクに変換して利用する際に少々不便を感じていました。 (TensorFlowのものは、自分で改造するにしても人に説明する際も、ちょっと面倒)

今回、Kerasで実装して、ある程度、うまく動作することを確認しました

ネットワークの説明

@Tushar-N
Tushar-N / pad_packed_demo.py
Last active December 27, 2022 06:35
How to use pad_packed_sequence in pytorch<1.1.0
import torch
import torch.nn as nn
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
seqs = ['gigantic_string','tiny_str','medium_str']
# make <pad> idx 0
vocab = ['<pad>'] + sorted(set(''.join(seqs)))
# make model
@joyrexus
joyrexus / README.md
Last active February 24, 2024 15:16
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@karino2
karino2 / BeamSearch.ipynb
Created March 21, 2017 23:16
Beam Searchについての簡単な説明
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mono0926
mono0926 / commit_message_example.md
Last active March 29, 2024 03:40
[転載] gitにおけるコミットログ/メッセージ例文集100
@nkt1546789
nkt1546789 / puclassifier.py
Last active May 12, 2022 15:13
Learning Classifiers from positive and unlabeled data by sample weighting proposed by Elkan and Noto 2008.
import numpy as np
from sklearn.linear_model import SGDClassifier
from sklearn.cross_validation import StratifiedKFold
from sklearn.grid_search import GridSearchCV
class PUClassifier(object):
def __init__(self, trad_clf=None, n_folds=2):
self.trad_clf = trad_clf
self.n_folds = n_folds