Hello, I am trying action recognition. If I understand correctly the code f = f.view(f.size(0), -1)
flattens the tensor but for fs[:, i, :] = f
, I can’t seem to guess what it is doing there.
def forward(self, inputs, hidden=None, steps=0):
length = len(inputs)
fs = torch.zeros(inputs[0].size(0), length, self.rnn.input_size).cuda()
for i in range(length):
f = inputs[i]
f = f.view(f.size(0), -1)
f = self.fc_pre(f)
fs[:, i, :] = f
Thank you in advance