コード例 #1
0
 protected void setLayerOptionsBuilder(SubsamplingLayer.Builder builder) {
   super.setLayerOptionsBuilder(builder);
   if (poolingType != null) builder.poolingType(poolingType.randomValue());
   if (kernelSize != null) builder.kernelSize(kernelSize.randomValue());
   if (stride != null) builder.stride(stride.randomValue());
   if (padding != null) builder.padding(padding.randomValue());
 }
コード例 #2
0
 @Override
 public SubsamplingLayer randomLayer() {
   SubsamplingLayer.Builder b = new SubsamplingLayer.Builder();
   setLayerOptionsBuilder(b);
   return b.build();
 }