Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Class Net(nn.module):
- self.depth = 5
- self.hidden_width = 100
- drnn_h = [Variable(torch.zeros(2 ** i, 1, self.hidden_width)).cuda().float()
- for i in range(self.depth)]
- self.drnn1 = drnn.DRNN(self.hidden_width, self.hidden_width, self.depth)
- ...
- ...
- def process(self, input):
- input = self.io_noise(input)
- lin_1 = self.lin1(input).view(1, 1, self.hidden_width)
- drnn_out, self.drnn_h = self.drnn1(lin_1, self.drnn_h)
- drnn_out = drnn_out.view(1, self.hidden_width)
- output = self.lin2(drnn_out).view(1, 1, self.io_width)
- return output
- DRNN (5 layer, 100 wide, with memory)
- Avg GPU Memory Allocation: 1102 MB
- Avg Iteration time: 43.842 sec
Add Comment
Please, Sign In to add comment