I ran the code of first part of II.1. Retraining the Convolutional Layers
(https://dnntoolbox.github.io/Net-Trim/#ii-net-trim-code-step-by-step-demo)
Error occurs in the line:
W_nt = nt_conv.run(x, y, V, b, W.shape, epsilon, rho=2, num_iterations=max_iterations)
Error message:
InvalidArgumentError: filter must be 4-dimensional: [128]
[[Node: Conv2D = Conv2D[T=DT_FLOAT, data_format="NHWC", padding="SAME", strides=[1, 1, 1, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_Placeholder_0_0, _arg_Placeholder_7_0_7)]]
And I checked the arguments:
x shape = (20, 60, 60, 256)
y shape = (20, 60, 60, 256)
V shape = (20, 60, 60, 256)
b shape = (20, 60, 60, 256)
W shape = (20, 60, 60, 256)
I have no idea what wrong is.
Appreciate your help!