thuml / Xlearn

Transfer Learning Library
459 stars 155 forks source link

some doubts about the code for guassian kernel #25

Open smallflyingpig opened 5 years ago

smallflyingpig commented 5 years ago

when calculate the guassian kernel, I found this line in loss.py: L2_distance = ((total0-total1)**2).sum(2) why here is sum(2)?

ChengYeung1222 commented 5 years ago

Sum up the tensor values in axis=2.