Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt
Create free AWS Account at https://aws.amazon.com/
I would be creating a t2.medium ubuntu machine for this demo.
Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt
Create free AWS Account at https://aws.amazon.com/
I would be creating a t2.medium ubuntu machine for this demo.
| const jsdom = require('jsdom') | |
| const { | |
| JSDOM | |
| } = jsdom | |
| function toJSDOM(responseBody) { | |
| return new JSDOM(responseBody) | |
| } | |
| /** |
| # git clone https://github.com/NVlabs/stylegan2 | |
| import os | |
| import numpy as np | |
| from scipy.interpolate import interp1d | |
| from scipy.io import wavfile | |
| import matplotlib.pyplot as plt | |
| import PIL.Image | |
| import moviepy.editor | |
| import dnnlib |
| # Authors: Mathieu Blondel, Vlad Niculae | |
| # License: BSD 3 clause | |
| import numpy as np | |
| def _gen_pairs(gen, max_iter, max_inner, random_state, verbose): | |
| rng = np.random.RandomState(random_state) | |
| # if tuple, interpret as randn |
| class Ralamb(Optimizer): | |
| def __init__(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8, weight_decay=0): | |
| defaults = dict(lr=lr, betas=betas, eps=eps, weight_decay=weight_decay) | |
| self.buffer = [[None, None, None] for ind in range(10)] | |
| super(Ralamb, self).__init__(params, defaults) | |
| def __setstate__(self, state): | |
| super(Ralamb, self).__setstate__(state) |
| def top_k_top_p_filtering(logits, top_k=0, top_p=0.0, filter_value=-float('Inf')): | |
| """ Filter a distribution of logits using top-k and/or nucleus (top-p) filtering | |
| Args: | |
| logits: logits distribution shape (vocabulary size) | |
| top_k >0: keep only top k tokens with highest probability (top-k filtering). | |
| top_p >0.0: keep the top tokens with cumulative probability >= top_p (nucleus filtering). | |
| Nucleus filtering is described in Holtzman et al. (http://arxiv.org/abs/1904.09751) | |
| """ | |
| assert logits.dim() == 1 # batch size 1 for now - could be updated for more but the code would be less clear | |
| top_k = min(top_k, logits.size(-1)) # Safety check |
In 2016, Facebook AI Research (FAIR) broke new ground with Wav2Letter, a fully convolutional speech recognition system.
In Wav2Letter, FAIR showed that systems based on convolutional neural networks (CNNs) could person as well as traditional recurrent neural network-based approaches.
In this article, we'll focus on an understudied module at the core of Wav2Letter: the Auto Segmentation (ASG) Criterion.