Skip to content

Instantly share code, notes, and snippets.

Avatar
🤖
Booting up Coqui.ai 🐸

Eren Gölge erogol

🤖
Booting up Coqui.ai 🐸
View GitHub Profile
@erogol
erogol / ddc_sentece_test_330k.ipynb
Last active May 14, 2021
DDC_sentece_test_330K.ipynb
View ddc_sentece_test_330k.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Coverage.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@erogol
erogol / tts_example.ipynb
Last active Sep 23, 2021
TTS_example.ipynb
View tts_example.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@erogol
erogol / tts_example.ipynb
Created Dec 19, 2018
TTS_example.ipynb
View tts_example.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View pyworld.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@erogol
erogol / pyworld_comparision.ipynb
Created May 2, 2018
pyworld comparision in diff settings.
View pyworld_comparision.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@erogol
erogol / NLL_OHEM.py
Last active Nov 24, 2020
Online hard example mining PyTorch
View NLL_OHEM.py
import torch as th
class NLL_OHEM(th.nn.NLLLoss):
""" Online hard example mining.
Needs input from nn.LogSotmax() """
def __init__(self, ratio):
super(NLL_OHEM, self).__init__(None, True)
self.ratio = ratio
@erogol
erogol / dataset_mongo.py
Last active Apr 21, 2021
PyTorch MongoDB dataset interface
View dataset_mongo.py
import io
import os
import numpy as np
from PIL import Image
from pymongo import MongoClient
from torch.utils.data import Dataset, DataLoader
from torchvision import transforms
def pil_loader(f):
@erogol
erogol / spp_net.py
Last active Jan 23, 2020
Pytorch implementation of SPP net
View spp_net.py
import math
from collections import OrderedDict
import torch.nn as nn
import torch.nn.init as init
import torch as th
import torch.nn.functional as F
from torch.autograd import Variable
class SPPLayer(nn.Module):
View alpha_dropout.py
keep_p = 1- dropout_p
a = np.sqrt(target_var / (keep_p *((1-keep_p) * np.power(alpha-target_mean,2) + target_var)))
b = target_mear - a * (keep_p * target_mean + (1 - keep_p) * alpha)
def alpha_dropout(x, alpha_p=-1.758, dropout_p=0.05):
mask = np.random.rand(*x.shape) > dropout_p
x[mask] = alpha_p
output = a*x + b
return output