没有属鼠的一天

19世纪意大利经济学家帕累托提出,生活中80%的结果只源于20%的活动。比如,是那20%的客户给你带来了80%的业绩,并创造了80%的利润,世界上80%的财富被20%的人掌握。因此,要把注意力放在20%的关键事情上。

更改链接:更改博客链接

for t in range(max_target_length):
            embed_q = self.dropout_layer(self.C(decoder_input))  # b * e 

            embed_q = embed_q.unsqueeze(0)
            hidden = hidden.squeeze(0)
            print('embed_q',embed_q.shape)# 1*128
            print('hidden\t',hidden.shape)
            if len(embed_q.size()) == 1: embed_q = embed_q.unsqueeze(0)
            _, hidden = self.rnn(embed_q, hidden)### ??????

            p_vocab = self.attend_vocab(self.C.weight, hidden.squeeze(0))
            all_decoder_outputs_vocab[t] = p_vocab
            _, topvi = p_vocab.data.topk(1)  # topvi: [batch_size * 1]

            # query question generator and reasoner using hidden state
            structure_type_logits, structure_type_action, structure_type_loss, \
            query_entity_h_logits, query_entity_h_action, query_entity_h_loss, \
            query_entity_t_logits, query_entity_t_action, query_entity_t_loss, candidates_prob, candidates_prob_logits = question_generator(context_arr, context_arr_lengths, hidden.squeeze(0), global_pointer, True)
            all_candidate_prob[t] = candidates_prob_logits