neural-vqa icon indicating copy to clipboard operation
neural-vqa copied to clipboard

2vis-lstm

Open jijibn opened this issue 7 years ago • 0 comments

Hello, how can I change this part of code to forward the image fisrt also could u plz provide 2vis-lstm code ? for t = 1, loader.q_max_length do lst = lstm_clones[t]:forward{qf:select(2,t), unpack(rnn_state[t-1])} -- at every time step, set the rnn state (h_t, c_t) to be passed as input in next time step rnn_state[t] = {} for i = 1, #init_state do table.insert(rnn_state[t], lst[i]) end end

-- after completing the unrolled LSTM forward pass with question features, forward the image features
lst = lstm_clones[loader.q_max_length + 1]:forward{imf, unpack(rnn_state[loader.q_max_length])}

jijibn avatar Jul 28 '17 08:07 jijibn