例如,我构建了AVE自动编码器,但是我需要在编码层进行一些计算,例如将编码层的W矩阵的某些行乘以或随机选择W矩阵的某些行。 sucode:
# here the X is coding layer parameters in the autoencoder
def func(X):
# dosomething in X,such as randomly select some rows to do calulation
# so i need use the index of row that i want to choose,i let the index
# to be a placeholder.but it's terminate before the session begin .
dosomething
return