Created
October 8, 2018 15:45
-
-
Save braingineer/1d7baecf2c99013d88d4d1db77449aec to your computer and use it in GitHub Desktop.
batch_gen = generate_batches(train_dataset, batch_size=8)
batch_dict = next(batch_gen)
embeddings = nn.Embedding(num_embeddings=len(vectorizer.surname_vocab),
embedding_dim=hyperparams.embedding_dim,
padding_idx=0)
x_embedded = embeddings(batch_dict['x_surnames'])
x_embedded.shape
x_embedded_fixed = x_embedded.permute(0, 2, 1)
x_embedded_fixed.shape
conv1 = nn.Conv1d(in_channels=hyperparams.embedding_dim,
out_channels=16,
kernel_size=3)
conv1(x_embedded_fixed).shape
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
x_embedded = embedding(batch_dict[...])
in_channels=feat,
out_channels=??,
kernel_size=??,
stride=1,
padding=0
)