SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 67830: An error occurs when you train a Convolution Neural Network (CNN) model that contains a one-dimensional transpose convolution layer

DetailsHotfixAboutRate It

The following error might occur when you train a CNN model (for example, a model that uses a SAS DLPy API fit call):

dlpy_history = dlpy_model.fit(data=train_tbl, 
                              valid_table=test_tbl,
                              data_specs=data_specs,
                              optimizer=optimizer)
ERROR: For transpose convolution layer conv2dtranspose_1, the adjusted input size (after paddings) must be larger than or equal to the kernel size.

The issue occurs when you use a kernel height of 1 in the Conv2DTranspose API call to create a transpose convolution layer in one dimension (1D).

For example, the following code uses Conv2DTranspose( . . ., height=1) to perform a 1D up-sampling task:

import dlpy

input_data = dlpy.layers.Input(name="input", n_channels=3, width=80, height=1)

conv_1 = dlpy.layers.Conv1D(16, 8, act='relu')(input_data)

pool_1 = dlpy.layers.Pooling(width=4, height=1)(conv_1)

conv_2 = dlpy.layers.Conv1D(8, 4, act='relu')(pool_1)

pool_2 = dlpy.layers.Pooling(width=2, height=1)(conv_2)

conv_3 = dlpy.layers.Conv1D(8, 2, act='relu')(pool_2)

upsampling_1 = dlpy.layers.Conv2DTranspose(8, width=2, height=1, stride_horizontal=2, stride_vertical=1, act='relu')(conv_3)

upsampling_2 = dlpy.layers.Conv2DTranspose(16, width=4, height=1, stride_horizontal=4, stride_vertical=1, act='relu')(upsampling_1)

adjust_1 = dlpy.layers.Dense(240)(upsampling_2)

adjust_2 = dlpy.layers.Reshape(width=80, height=1, depth=3)(adjust_1)

output_data = dlpy.layers.Segmentation(name="output")(adjust_2)

dlpy_model_name = "conv_ae"
dlpy_model = dlpy.Model(s, inputs=input_data, outputs=output_data)
dlpy_model.compile()
 

Click the Hot Fix tab in this note for a link to instructions about accessing and applying the software update.



Operating System and Release Information

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemSAS Visual Data Mining and Machine LearningMicrosoft® Windows® for x648.52021.1.1ViyaViya
Linux for x648.52021.1.1ViyaViya
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.