It's entirely possible that this question is a duplicate, but I don't know what this concept is called so I don't even know how to search for it.
I'm new to Python and trying to understand this function from a Caffe example:
def conv_relu(bottom, ks, nout, stride=1, pad=0, group=1):
conv = L.Convolution(bottom, kernel_size=ks, stride=stride,
num_output=nout, pad=pad, group=group)
return conv, L.ReLU(conv, in_place=True)
I figured the parameters stride=1
, pad=1
, etc in the conv_relu
function definition are default initial values, but then what do kernel_size=ks
, stride=stride
, etc in the L.Convolution
call mean? Is it kind of like a name/value pair?
If nothing else, can someone please tell me what this is called?
Those are keyword arguments.
some_function(x=y, z=zz)
x
is the name of the parameter when the function was declared, and y
is the value that's being passed in.
Reasons to use keyword arguments:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With