@@ -2667,7 +2667,7 @@ def __add_evaluator__(e):
2667
2667
2668
2668
return LayerOutput (name , LayerType .COST , parents = [input , label ])
2669
2669
2670
- def conv_operator (input , filter_size , num_filters ,
2670
+ def conv_operator (img , filter , filter_size , num_filters ,
2671
2671
num_channel = None , stride = 1 , padding = 0 , groups = 1 ,
2672
2672
filter_size_y = None , stride_y = None , padding_y = None ):
2673
2673
"""
@@ -2680,13 +2680,16 @@ def conv_operator(input, filter_size, num_filters,
2680
2680
2681
2681
.. code-block:: python
2682
2682
2683
- op = conv_operator(input=[layer1, layer2],
2683
+ op = conv_operator(img=input1,
2684
+ filter=input2,
2684
2685
filter_size=3.0,
2685
2686
num_filters=64,
2686
2687
num_channels=64)
2687
2688
2688
- :param input: Input layer.
2689
- :type input: LayerOutput|list|tuple
2689
+ :param img: input image
2690
+ :type img: LayerOutput
2691
+ :param filter: input filter
2692
+ :type filter: LayerOutput
2690
2693
:param filter_size: The x dimension of a filter kernel.
2691
2694
:type filter_size: int
2692
2695
:param filter_size_y: The y dimension of a filter kernel. Since
@@ -2708,14 +2711,13 @@ def conv_operator(input, filter_size, num_filters,
2708
2711
:return: A ConvOperator Object.
2709
2712
:rtype: ConvOperator
2710
2713
"""
2711
- assert isinstance (input , list ) or isinstance (input , tuple )
2712
2714
if filter_size_y is None :
2713
2715
filter_size_y = filter_size
2714
2716
if stride_y is None :
2715
2717
stride_y = stride
2716
2718
if padding_y is None :
2717
2719
padding_y = padding
2718
- op = ConvOperator (input_layer_names = [x .name for x in input ],
2720
+ op = ConvOperator (input_layer_names = [img .name , filter . name ],
2719
2721
num_filters = num_filter ,
2720
2722
conv_conf = Conv (filter_size = filter_size ,
2721
2723
padding = padding ,
@@ -2725,7 +2727,7 @@ def conv_operator(input, filter_size, num_filters,
2725
2727
padding_y = padding_y ,
2726
2728
stride_y = stride_y ,
2727
2729
groups = groups ))
2728
- op .origin = input
2730
+ op .origin = [ img , filter ]
2729
2731
op .origin .operator = "conv_op"
2730
2732
return op
2731
2733
0 commit comments