I hereby claim:
- I am marcoleewow on github.
- I am marcoleewow (https://keybase.io/marcoleewow) on keybase.
- I have a public key ASA5wRJ5pC3LsccRazSVrRDLjSgWk7bsSAGb09DGjtRDEQo
To claim this, I am signing this object:
import os | |
import numpy as np | |
import coremltools | |
from coremltools.models.neural_network import flexible_shape_utils | |
import torch | |
from torch import nn | |
import onnx |
import editdistance | |
def cer(y_true: str, y_pred: str) -> float: | |
assert isinstance(y_true, str) and isinstance(y_pred, str) | |
n_err = editdistance.eval(y_true.rstrip(), y_pred.rstrip()) | |
return n_err / len(y_true) | |
def wer(transcript: str, reference: str) -> float: |
import torch | |
from torch import nn | |
import torch.nn.functional as F | |
import os | |
import onnx | |
from onnx_coreml import convert | |
import pytest | |
from coremltools.proto import NeuralNetwork_pb2 #type: ignore | |
""" |
I hereby claim:
To claim this, I am signing this object:
import numpy as np | |
import tensorflow as tf | |
def CTCLossExactPathTest(): | |
BIG_NEG_NUMBER = -100 | |
logit = np.array([[BIG_NEG_NUMBER, 0., BIG_NEG_NUMBER, BIG_NEG_NUMBER], | |
[0., BIG_NEG_NUMBER, BIG_NEG_NUMBER, BIG_NEG_NUMBER], | |
[BIG_NEG_NUMBER, BIG_NEG_NUMBER, 0., BIG_NEG_NUMBER]]) | |
""" |
import numpy as np | |
import tensorflow as tf | |
def CTCLossSimpleTest(): | |
""" | |
Alex Graves Paper example: | |
# a - | |
P = [[0.3, 0.7], # t = 0 | |
[0.4, 0.6]] # t = 1 |
import numpy as np | |
from keras import backend as K | |
from keras.layers import * | |
from keras.preprocessing.image import ImageDataGenerator | |
from keras.models import Sequential, Model | |
from keras.optimizers import SGD, Adam | |
np.random.seed(1337) # for reproducibility |