本文整理汇总了Python中Job.Job.function方法的典型用法代码示例。如果您正苦于以下问题:Python Job.function方法的具体用法?Python Job.function怎么用?Python Job.function使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Job.Job
的用法示例。
在下文中一共展示了Job.function方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: range
# 需要导入模块: from Job import Job [as 别名]
# 或者: from Job.Job import function [as 别名]
someAs = [numpy.eye(3, dtype=numpy.float32) for i in range(5)]
myenv = theano.FunctionGraph(As, [C])
myoptimizer = f.maker.mode.optimizer
def show_optimization_path(env, filename="opt_path.txt", optimizer=myoptimizer):
file = open(filename, "w")
for opt in myoptimizer:
file.write("\n\n")
file.write(str(opt) + "\n")
opt.optimize(env)
theano.printing.debugprint(env, file=file)
file.flush()
file.close()
# can now do
# someAs = someAs = [numpy.eye(3, dtype=numpy.float32) for i in range(5)]
# d = intermediate_shapes(As, [C], someAs)
# aps = list(all_applys([C]))
# d[aps[i].inputs[j]]
env = theano.FunctionGraph([x], [z])
an = env.outputs[0].owner
job = Job(an)
f = job.function()
# g = job.function(gpu=True)