张量流的并行

时间:2019-03-13 00:09:30

标签: python tensorflow random-forest decision-tree

我正在尝试通过我自己的决策树实现来并行化随机森林中树木的生长,但是通过构建并行图来通过张量流进行并行化。 tf.map_fn(lambda index: model.fit(xTrain[index,:],yTrain[index,:]).predict(xTest),partitions) 是否在张量平行度的每个子集上自动执行函数?

[[1,2,3],[2,3,4]]

这里的分区是行索引的列表,例如:parallel_iterations

该函数还有一个自变量d[cols] = d[cols].div(d['a0'], axis = 0).astype('int') out: a0 d2 b3 t4 0 1 2 3 0.8 1 1 1 1 9.0 2 1 1 1 2.5 3 1 1 1 8.0

允许并行运行的迭代次数。构建图形时,默认值为10。急切执行时,默认值为1

该参数是否意味着要并行运行多少个子集?

我正在使用的系统具有48个内核,我基本上想在构建林时利用所有内核。

0 个答案:

没有答案