Skip to content

Instantly share code, notes, and snippets.

View Pibborn's full-sized avatar

Mattia Cerrato Pibborn

View GitHub Profile
@Pibborn
Pibborn / mlp.py
Created June 1, 2018 16:12
MLP without nn.Module?
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,
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)