Have I written custom code (as opposed to using example directory):
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10 &&Linux Ubuntu 18.04
CNTK backend (yes/no): yes
CNTK version: 2.7(CPU)
Python version: 3.6.9
CUDA/cuDNN version: -
GPU model and memory: -
Describe the current behavior
When I tried to build Batchnormalization on CNTK, it returned an error in cntk\ops\__init__.py line 3911, related codes are shown in the following picture. For detailed parameters of Batchnormalization, you can refer to the following code snippetValueError: AssignNode: None of the operands 'Parameter('batch_normalization_1/moving_mean', [], [1]), Output('Plus275_Output_0', [#], [1])' can have dynamic axes.
The key of this problem is that one of batch_normalization_1 and Plus275_Output_0 has a dynamic axis, which causes the CNTK operation to fail. These two variable was shown in the following pictures.
But I didn't find any warning or description about the specific parameters leading to this kind of problem in the documents.
I wonder what had happened in the cntk calculation process. In addition, this unexpected problem may confuse CNTK users.
Code to reproduce the issue
import numpy as np
import keras.layers as L
from keras.engine import Model, Input
## Using CNTK as Keras backend.
## Input dtype default is float32
layer = 'BatchNormalization'
kwargs = {'axis': 0, 'epsilon': 0.013340624169680626, 'center': True, 'scale': False}
input = (10 * np.random.random((1,32,32,16)))
layer_cls = getattr(L, layer)
layer = layer_cls(**kwargs)
x = Input(batch_shape=input.shape)
y = layer(x)
bk_model =Model(x, y)
print('finish')
System information
Have I written custom code (as opposed to using example directory): OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10 &&Linux Ubuntu 18.04 CNTK backend (yes/no): yes CNTK version: 2.7(CPU) Python version: 3.6.9 CUDA/cuDNN version: - GPU model and memory: -
Describe the current behavior When I tried to build![1-1](https://user-images.githubusercontent.com/46860123/75953753-fee5fe80-5eec-11ea-9f3b-e3ef2b028053.jpg)
Batchnormalization
on CNTK, it returned an error incntk\ops\__init__.py line 3911
, related codes are shown in the following picture. For detailed parameters ofBatchnormalization
, you can refer to the following code snippetValueError: AssignNode: None of the operands 'Parameter('batch_normalization_1/moving_mean', [], [1]), Output('Plus275_Output_0', [#], [1])' can have dynamic axes
.The key of this problem is that one of
![1-3](https://user-images.githubusercontent.com/46860123/75953770-086f6680-5eed-11ea-9e54-76c0de4370fb.jpg)
batch_normalization_1
andPlus275_Output_0
has a dynamic axis, which causes the CNTK operation to fail. These two variable was shown in the following pictures.But I didn't find any warning or description about the specific parameters leading to this kind of problem in the documents. I wonder what had happened in the cntk calculation process. In addition, this unexpected problem may confuse CNTK users. Code to reproduce the issue