baseline_model/data_utils/train_tree_encoder_v2.py [79:100]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            queue_tree[i] = []
            queue_tree[i].append({"tree" : dec_tree_batch[i-1], "parent": 0, "child_index": 1})
        loss = 0
        cur_index, max_index = 1,1
        dec_batch = {}
        dec_batch_trg = {}
        #print(queue_tree[1][0]["tree"].to_string());exit()
        while (cur_index <= max_index):
            #print(cur_index)
            # build dec_batch for cur_index
            max_w_len = -1
            batch_w_list = []
            batch_w_list_trg = []
            # pdb.set_trace()
            for i in range(1, opt.batch_size+1):
                w_list = []
                w_list_trg = []
                if (cur_index <= len(queue_tree[i])):
                    t = queue_tree[i][cur_index - 1]["tree"]
                    for ic in range (len(t.children)):
                        w_list.append(t.value)
                        w_list_trg.append(t.children[ic].value)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



baseline_model/data_utils/train_tree_encoder_v2.py [268:289]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            queue_tree[i]  = []
            queue_tree[i].append({"tree" : dec_tree_batch[i-1], "parent": 0, "child_index": 1})

        loss = 0
        cur_index, max_index = 1,1
        dec_batch = {}
        dec_batch_trg = {}

        while (cur_index <= max_index):
            # build dec_batch for cur_index
            max_w_len = -1
            batch_w_list = []
            batch_w_list_trg = []
            for i in range(1, opt.batch_size+1):
                w_list = []
                w_list_trg = []
                if (cur_index <= len(queue_tree[i])):
                    t = queue_tree[i][cur_index - 1]["tree"]
                    # for ic in range (t.num_children):
                    for ic in range (len(t.children)):
                        w_list.append(t.value)
                        w_list_trg.append(t.children[ic].value)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



