提交 cc2b3a66 authored 作者: Frederic's avatar Frederic

Fix the detection of cpu vs gpu in the tutorial.

new op wasn't added there.
上级 fb77d434
......@@ -57,10 +57,10 @@ The following output depicts the pre- and post- compilation graphs.
predict = theano.function(inputs=[x], outputs=prediction,
name="predict")
if any( [x.op.__class__.__name__=='Gemv' for x in
if any([x.op.__class__.__name__ in ['Gemv', 'CGemv'] for x in
train.maker.fgraph.toposort()]):
print 'Used the cpu'
elif any( [x.op.__class__.__name__=='GpuGemm' for x in
elif any([x.op.__class__.__name__ == 'GpuGemm' for x in
train.maker.fgraph.toposort()]):
print 'Used the gpu'
else:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论