给定一些要获取的符号变量,我需要知道哪些占位符是依赖项。
在Theano,我们有:
import theano as th
import theano.tensor as T
x, y, z = T.scalars('xyz')
u, v = x*y, y*z
w = u + v
th.gof.graph.inputs([w]) # gives [x, y, z]
th.gof.graph.inputs([u]) # gives [x, y]
th.gof.graph.inputs([v]) # gives [y, z]
th.gof.graph.inputs([u, v]) # gives [x, y, z]
如何在TensorFlow中做同样的事情?
答案 0 :(得分:3)
这不是内置功能(我知道),但很容易制作一个:
# Naive method
a <- drm(y~x,data=subs, fct=LL.4(),control=ctl, start=params)
#Poisson Method
a <- drm(y~x,data=subs, fct=LL.4(),control=ctl, start=params, type="Poisson")
#BOXCOX method
a <- drm(y~x,data=subs, fct=LL.4(),control=ctl, start=params)
a2 <- boxcox(a)
当然,您也可以将占位符过滤放入函数中。