d3819b2941d22569389de4f2ce61da53c2e95c47,test/graph_builder_test/graph_test/operators_test/axiswise_bias_test.py,,test_every_order,#,12
Before Change
// FIXME 各orderをテストにわけられないか
def test_every_order():
for order in [OrderC,
OrderNC,
OrderCN,
OrderNHWC,
OrderHWNC,
OrderHWCN,
OrderNCHW,
OrderCNHW,
OrderCHWN]:
for axis in [Axis.C]:
default_order = {
1: OrderC,
2: OrderNC,
4: OrderNHWC,
Axis.C: OrderC
}
op = AxiswiseBias("op", {"axis": axis})
x = Variable(np.arange(order.ndim) + 1, default_order[order.ndim])
w = Variable((x.shape_dict[axis],), default_order[axis])
y, = op(x, w)
for axis in y.axis_order.axes:
assert y.shape_dict[axis] == x.shape_dict[axis]
@raises(AssertionError)
def test_invalid_size():
op = AxiswiseBias("op", {"axis": Axis.C})
After Change
op = AxiswiseBias("op", {"axis": axis})
x = Variable(np.arange(order_x.ndim) + 1, default_order[order_x.ndim])
x.change_axis_order(order_x)
w = Variable((x.shape_dict[axis],), default_order[axis])
y, = op(x, w)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: mil-tokyo/webdnn
Commit Name: d3819b2941d22569389de4f2ce61da53c2e95c47
Time: 2017-05-05
Author: y.kikura@gmail.com
File Name: test/graph_builder_test/graph_test/operators_test/axiswise_bias_test.py
Class Name:
Method Name: test_every_order
Project Name: mil-tokyo/webdnn
Commit Name: d3819b2941d22569389de4f2ce61da53c2e95c47
Time: 2017-05-05
Author: y.kikura@gmail.com
File Name: test/graph_builder_test/graph_test/operators_test/axiswise_scale_test.py
Class Name:
Method Name: test_every_order
Project Name: ilastik/ilastik
Commit Name: 59da87e9b629944c2e3340b4771f3de9190ead38
Time: 2015-03-06
Author: bergs@janelia.hhmi.org
File Name: ilastik/applets/dataSelection/datasetInfoEditorWidget.py
Class Name: DatasetInfoEditorWidget
Method Name: _applyAxesToTempOps