diff --git a/src/operator/contrib/bilinear_resize-inl.h b/src/operator/contrib/bilinear_resize-inl.h index 0db9494748a0..6032c881ed46 100644 --- a/src/operator/contrib/bilinear_resize-inl.h +++ b/src/operator/contrib/bilinear_resize-inl.h @@ -61,10 +61,10 @@ struct BilinearSampleParam : public dmlc::Parameter { int mode; bool align_corners; DMLC_DECLARE_PARAMETER(BilinearSampleParam) { - DMLC_DECLARE_FIELD(height).set_default(1).set_range(1, 10000) + DMLC_DECLARE_FIELD(height).set_default(1).set_lower_bound(1) .describe("output height (required, but ignored if scale_height is defined or mode is not " "\"size\")"); - DMLC_DECLARE_FIELD(width).set_default(1).set_range(1, 10000) + DMLC_DECLARE_FIELD(width).set_default(1).set_lower_bound(1) .describe("output width (required, but ignored if scale_width is defined or mode is not " "\"size\")"); DMLC_DECLARE_FIELD(scale_height).set_default(dmlc::optional()) diff --git a/src/operator/contrib/deformable_convolution-inl.h b/src/operator/contrib/deformable_convolution-inl.h index ca453e3da8aa..5e0e86bb3a54 100644 --- a/src/operator/contrib/deformable_convolution-inl.h +++ b/src/operator/contrib/deformable_convolution-inl.h @@ -75,13 +75,13 @@ struct DeformableConvolutionParam : public dmlc::Parameter { .describe("convolution dilate: (h, w) or (d, h, w)"); DMLC_DECLARE_FIELD(pad).set_default(mxnet::TShape(0, 0)) .describe("pad for convolution: (h, w) or (d, h, w)"); - DMLC_DECLARE_FIELD(num_filter).set_range(1, 100000) + DMLC_DECLARE_FIELD(num_filter).set_lower_bound(1) .describe("convolution filter(channel) number"); DMLC_DECLARE_FIELD(num_group).set_default(1) .describe("Number of group partitions. Equivalent to slicing input into num_group\n " "partitions, apply convolution on each, then concatenate the results"); - DMLC_DECLARE_FIELD(workspace).set_default(1024).set_range(0, 8192) + DMLC_DECLARE_FIELD(workspace).set_default(1024).set_lower_bound(0) .describe("Maximum temporary workspace allowed for convolution (MB)." "This parameter determines the effective batch size of the convolution " "kernel, which may be smaller than the given batch size. " diff --git a/src/operator/nn/convolution-inl.h b/src/operator/nn/convolution-inl.h index 7d5f7c7d5757..87c82c370d1e 100644 --- a/src/operator/nn/convolution-inl.h +++ b/src/operator/nn/convolution-inl.h @@ -75,11 +75,11 @@ struct ConvolutionParam : public dmlc::Parameter { .describe("Convolution dilate: (w,), (h, w) or (d, h, w). Defaults to 1 for each dimension."); DMLC_DECLARE_FIELD(pad).set_default(mxnet::TShape(0, 0)) .describe("Zero pad for convolution: (w,), (h, w) or (d, h, w). Defaults to no padding."); - DMLC_DECLARE_FIELD(num_filter).set_range(1, 100000) + DMLC_DECLARE_FIELD(num_filter).set_lower_bound(1) .describe("Convolution filter(channel) number"); DMLC_DECLARE_FIELD(num_group).set_default(1) .describe("Number of group partitions."); - DMLC_DECLARE_FIELD(workspace).set_default(1024).set_range(0, 8192) + DMLC_DECLARE_FIELD(workspace).set_default(1024).set_lower_bound(0) .describe("Maximum temporary workspace allowed (MB) in convolution." "This parameter has two usages. When CUDNN is not used, it determines the " "effective batch size of the convolution kernel. When CUDNN is used, it controls " diff --git a/src/operator/nn/deconvolution-inl.h b/src/operator/nn/deconvolution-inl.h index 58f9be702396..0aac39a2202b 100644 --- a/src/operator/nn/deconvolution-inl.h +++ b/src/operator/nn/deconvolution-inl.h @@ -85,11 +85,11 @@ struct DeconvolutionParam : public dmlc::Parameter { "`adj` will be ignored and computed accordingly."); DMLC_DECLARE_FIELD(target_shape).set_default(mxnet::TShape(0, 0)) .describe("Shape of the output tensor: (w,), (h, w) or (d, h, w)."); - DMLC_DECLARE_FIELD(num_filter).set_range(1, 100000) + DMLC_DECLARE_FIELD(num_filter).set_lower_bound(1) .describe("Number of output filters."); DMLC_DECLARE_FIELD(num_group).set_default(1) .describe("Number of groups partition."); - DMLC_DECLARE_FIELD(workspace).set_default(512).set_range(0, 8192) + DMLC_DECLARE_FIELD(workspace).set_default(512).set_lower_bound(0) .describe("Maximum temporary workspace allowed (MB) in deconvolution." "This parameter has two usages. When CUDNN is not used, it determines the " "effective batch size of the deconvolution kernel. When CUDNN is used, " diff --git a/src/operator/nn/upsampling-inl.h b/src/operator/nn/upsampling-inl.h index 8219e3e9bd8d..daf74b71e410 100644 --- a/src/operator/nn/upsampling-inl.h +++ b/src/operator/nn/upsampling-inl.h @@ -56,7 +56,7 @@ struct UpSamplingParam : public dmlc::Parameter { uint64_t workspace; DMLC_DECLARE_PARAMETER(UpSamplingParam) { DMLC_DECLARE_FIELD(scale) - .set_range(1, 1000) + .set_lower_bound(1) .describe("Up sampling scale"); DMLC_DECLARE_FIELD(num_filter) .describe("Input filter. Only used by bilinear sample_type." @@ -79,7 +79,7 @@ struct UpSamplingParam : public dmlc::Parameter { "upsampling, this can be 1-N; the size of output will be" "(scale*h_0,scale*w_0) and all other inputs will be upsampled to the" "same size. For bilinear upsampling this must be 2; 1 input and 1 weight."); - DMLC_DECLARE_FIELD(workspace).set_default(512).set_range(0, 8192) + DMLC_DECLARE_FIELD(workspace).set_default(512).set_lower_bound(0) .describe("Tmp workspace for deconvolution (MB)"); } }; // struct UpSamplingParam