# Why differnce coeffs size? (Wavelets transform)

This is my wavelets transform code

But I have some problems
ValueError
`coeffs` must all be of equal size (or None)
File “/home/mars/workspace/cy_workspace/vscode/pywavelets/py.py”, line 21, in
coeffs_u_5 = pywt.idwt2((coeffs_u_4,coeffs_d_2),‘db3’)

coeffs_u_5 have a difference size error
Why coeffs_u_4 difference size coeffs_d_2 please tell me solution Thank you

coeffs_d_2.size:4489
coeffs_u_4.size:4624
import pywt

``````import pywt.data

import cv2

import torch

import numpy as np

import matplotlib.pyplot as plt

coeffs_d_1 = pywt.dwt2(original,'db3')

coeffs_d_2 = pywt.dwt2(coeffs_d_1,'db3')

coeffs_d_3 = pywt.dwt2(coeffs_d_2,'db3')

coeffs_d_4 = pywt.dwt2(coeffs_d_3,'db3')

coeffs_d_5 = pywt.dwt2(coeffs_d_4,'db3')

coeffs_d_6 = pywt.dwt2(coeffs_d_5,'db3')

coeffs_u_1 = pywt.idwt2((np.empty(coeffs_d_6.shape),coeffs_d_6),'db3')

coeffs_u_2 = pywt.idwt2((coeffs_u_1,coeffs_d_5),'db3')

coeffs_u_3 = pywt.idwt2((coeffs_u_2,coeffs_d_4),'db3')

coeffs_u_4 = pywt.idwt2((coeffs_u_3,coeffs_d_3),'db3')

coeffs_u_5 = pywt.idwt2((coeffs_u_4,coeffs_d_2),'db3') << This Line have an error

coeffs_u_6 = pywt.idwt2((coeffs_u_5,coeffs_d_1),'db3')

plt.imshow(coeffs_u_6,cmap='gray')

plt.show()``````