This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch.nn as nn | |
import torch.nn.functional as F | |
import math | |
batch_size = 8 | |
## data loading | |
from torchvision import datasets, transforms | |
train_loader = torch.utils.data.DataLoader( | |
datasets.MNIST('../data', train=True, download=True, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from DeepSpeech import BiRNN, create_inference_graph, export, initialize_globals | |
import tensorflow as tf | |
if __name__ == '__main__': | |
batch_size = 8 | |
input_tensor = tf.placeholder(tf.float32, [batch_size, None, 494]) | |
seq_length = tf.placeholder(tf.int32, [batch_size]) | |
dropout = [0.] * 6 | |
initialize_globals() | |
logits = BiRNN(input_tensor, tf.to_int64(seq_length), dropout) |