src/train.py
def prepareNextIter(labelA,labelC,src,tgt):
    """ labelA labelC are np arraies, src tgt are tensors """
    nextSrc = [[] for i in range(numA)]
    nextTgt = [[] for i in range(numA)]
    for i in range(len(src)):
        nextSrc[labelC[i]].append(src[i])
        nextTgt[labelC[i]].append(tgt[i])
    nextSrc = [tensorData(nextSrc[i]) for i in range(numA)]
    nextTgt = [tensorData(nextTgt[i]) for i in range(numA)]
    return nextSrc,nextTgt
 labelA labelC are np arraies, src tgt are tensors 
labelA labelC are np arraies, src tgt are tensors
labelA labelC are np arraies src tgt are tensors
def prepareNextIter(labelA,labelC,src,tgt):
    nextSrc = [[] for i in range(numA)]
    nextTgt = [[] for i in range(numA)]
    for i in range(len(src)):
        nextSrc[labelC[i]].append(src[i])
        nextTgt[labelC[i]].append(tgt[i])
    nextSrc = [tensorData(nextSrc[i]) for i in range(numA)]
    nextTgt = [tensorData(nextTgt[i]) for i in range(numA)]
    return nextSrc,nextTgt
def prepareNextIter ( labelA , labelC , src , tgt ) : nextSrc = [ [ ] for i in range ( numA ) ] nextTgt = [ [ ] for i in range ( numA ) ] for i in range ( len ( src ) ) : nextSrc [ labelC [ i ] ] . append ( src [ i ] ) nextTgt [ labelC [ i ] ] . append ( tgt [ i ] ) nextSrc = [ tensorData ( nextSrc [ i ] ) for i in range ( numA ) ] nextTgt = [ tensorData ( nextTgt [ i ] ) for i in range ( numA ) ] return nextSrc , nextTgt
labelA labelC are np arraies, src tgt are tensors
labelA labelC are np arraies src tgt are tensors
""" labelA labelC are np arraies, src tgt are tensors """
labelA
labelC
src
tgt