bee774aa7ab224e6646abe41022291ad34ff3fd5,12_1_rnn_basics.py,,,#,6

Before Change


inputs = Variable(torch.Tensor([[h, e, l, l, o]]))
print("input size", inputs.size())

for one in inputs[0]:
    one = one.view(1, 1, -1)
    // Input: (batch, seq_len, input_size) when batch_first=True
    out, hidden = cell(one, hidden)

After Change


// We can do the whole at once
// Propagate input through RNN
// Input: (batch, seq_len, input_size) when batch_first=True
inputs = inputs.view(1, 5, -1)
out, hidden = cell(inputs, hidden)
print("sequence input size", inputs.size(), "out size", out.size())

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: hunkim/PyTorchZeroToAll
Commit Name: bee774aa7ab224e6646abe41022291ad34ff3fd5
Time: 2017-11-11
Author: hunkim@gmail.com
File Name: 12_1_rnn_basics.py
Class Name:
Method Name:


Project Name: open-mmlab/mmdetection
Commit Name: 60312064e4d7eb62470977bffff75c46f4080a22
Time: 2021-01-24
Author: xvjiarui0826@gmail.com
File Name: mmdet/core/post_processing/bbox_nms.py
Class Name:
Method Name: multiclass_nms


Project Name: jwyang/faster-rcnn.pytorch
Commit Name: cd48957b671f2799c19578f73025da50dd100de5
Time: 2017-09-05
Author: jlu347@jarvis.cc.gatech.edu
File Name: lib/model/rpn/rpn.py
Class Name: _RPN
Method Name: forward


Project Name: eriklindernoren/PyTorch-YOLOv3
Commit Name: 6438ad1f647285e66471700442f02878221b8c3a
Time: 2018-06-17
Author: eriklindernoren@gmail.com
File Name: utils/utils.py
Class Name:
Method Name: build_targets