IPython引擎返回不同的结果 [英] IPython engines returning different results
问题描述
希望有人可以启发我,而不必发布大量令人困惑的代码。
Hopefully someone can enlighten me without me having to post a lot of confusing code.
我正在使用IPython.parallel来处理神经网络。为了找到错误,我决定使用相同的输入数据将相同的网络发送给每个客户端。我希望每个客户都能得到相同的答案,大部分时间都是如此。但有时我会从每个客户端获得截然不同的结果。
I am using IPython.parallel to process neural networks. In an attempt to find a bug I decided to send the same network out to each client with the same input data. I would expect to have each client return the same answer, which most of the time, it does. However sometimes I will get vastly different results from each client.
这里只是运行代码5次不同的示例。每次运行代码时都会构建一个新网络,因此我希望在运行之间有不同的解决方案,但是,每次运行我都会向同一个网络发送相同的网络...
here's just a sample of running the code 5 different times. Each time the code is run a new network is built and so I would expect a different solution between runs, however, each run I am sending out the same network to each client...
我使用apply_async将进程发送到不同的客户端(所有客户端都在一台本地计算机上。)
I am using apply_async to send out the process to the different clients (all of which are on a single local machine.)
没有生成随机数在处理过程中,我使用的唯一数学函数是内置的 pow()
和 numpy.tanh()
。
no random numbers are being generated during the processing and the only math functions I am using are the built in pow()
and numpy.tanh()
.
关于追踪正在发生的事情的最佳方法的任何想法?
any ideas on the best way to track down what's going on?
%> ./ld_cluster.py
Available workers: 5
importing sys on engine(s)
0 ) b0ca598b-8cc8-4de7-8e6e-f62c1e6eba58 :: 2.020202
0 ) b0ca598b-8cc8-4de7-8e6e-f62c1e6eba58 :: 2.020202
0 ) b0ca598b-8cc8-4de7-8e6e-f62c1e6eba58 :: 2.020202
0 ) b0ca598b-8cc8-4de7-8e6e-f62c1e6eba58 :: 2.020202
0 ) b0ca598b-8cc8-4de7-8e6e-f62c1e6eba58 :: 2.020202
%> ./ld_cluster.py
Available workers: 5
importing sys on engine(s)
0 ) ff0ac798-3eb9-43cd-940a-6bc77447a3b4 :: 1.846979
0 ) ff0ac798-3eb9-43cd-940a-6bc77447a3b4 :: 1.846979
0 ) ff0ac798-3eb9-43cd-940a-6bc77447a3b4 :: 1.846979
0 ) ff0ac798-3eb9-43cd-940a-6bc77447a3b4 :: 1.846979
0 ) ff0ac798-3eb9-43cd-940a-6bc77447a3b4 :: 1.846979
%> ./ld_cluster.py
Available workers: 5
importing sys on engine(s)
0 ) f679d9c3-9e00-4b32-84b7-72fcf9fb5da0 :: 2.021491
0 ) f679d9c3-9e00-4b32-84b7-72fcf9fb5da0 :: 2.021491
0 ) f679d9c3-9e00-4b32-84b7-72fcf9fb5da0 :: 2.021491
0 ) f679d9c3-9e00-4b32-84b7-72fcf9fb5da0 :: 2.021491
0 ) f679d9c3-9e00-4b32-84b7-72fcf9fb5da0 :: 2.021491
%> ./ld_cluster.py
Available workers: 5
importing sys on engine(s)
0 ) f28617ef-72e7-4de3-a0a7-a98057efaa2e :: 1.979795
0 ) f28617ef-72e7-4de3-a0a7-a98057efaa2e :: 1.979795
0 ) f28617ef-72e7-4de3-a0a7-a98057efaa2e :: 1.979795
0 ) f28617ef-72e7-4de3-a0a7-a98057efaa2e :: 1.979795
0 ) f28617ef-72e7-4de3-a0a7-a98057efaa2e :: 1.979795
%> ./ld_cluster.py
Available workers: 5
importing sys on engine(s)
0 ) dd635626-4881-4470-909f-6a2fbe73b06d :: 2.020196
0 ) dd635626-4881-4470-909f-6a2fbe73b06d :: 1.991076
0 ) dd635626-4881-4470-909f-6a2fbe73b06d :: 1.952310
0 ) dd635626-4881-4470-909f-6a2fbe73b06d :: 1.887462
0 ) dd635626-4881-4470-909f-6a2fbe73b06d :: 2.019929
推荐答案
以为我应该在这里显示答案(如果可以这样称呼)...
Thought I should show the answer (if it can be called that) here as well...
请参阅这个线程。
这篇关于IPython引擎返回不同的结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!