Skip to content

Instantly share code, notes, and snippets.

@keshav47
keshav47 / FlatCnnLayer.py
Created January 31, 2020 07:42 — forked from paduvi/FlatCnnLayer.py
Hierarchical Softmax CNN Classification
import torch
import torch.nn as nn
import torch.nn.init as init
dropout_prob = 0.5
class FlatCnnLayer(nn.Module):
def __init__(self, embedding_size, sequence_length, filter_sizes=[3, 4, 5], out_channels=128):
super(FlatCnnLayer, self).__init__()