I currently do np.append
to combine with two array, but it can’t work, it shows:
ValueError: all the input array dimensions except for the concatenation axis must match exactly, but along dimension 0, the array at index 0 has size 64 and the array at index 1 has size 0
Here’s my code
weights_block_32_0 = weights_block_32[0][0:block_size]
print(weights_block_32_0)
print(weights_block_32[0][block_size * (i+1):block_size * (i+2)])
for i in range(count - 1):
weights_block_32_0 = np.append(weights_block_32_0, weights_block_32[0][block_size * (i+1):block_size * (i+2)], 1)
output
[[-0.11692056 -0.21988727 -0.2782506 ... -0.20971598 -0.358836
0.365253 ]
[-0.1029752 -0.05929758 -0.14116701 ... -0.11534233 -0.01058054
0.10387182]
[ 0.21475197 0.4043065 0.01345642 ... 0.04622769 0.21393798
-0.12899256]
...
[ 0.08888344 -0.04325306 0.02912059 ... 0.09227641 -0.0109155
-0.09982339]
[ 0.0463181 0.04997677 0.07291862 ... -0.04850281 -0.04819945
-0.02194837]
[-0.06676714 0.02217779 0.06599618 ... -0.06789055 0.00419611
0.09231257]]
[]
ValueError: all the input array dimensions except for the concatenation axis must match exactly, but along dimension 0, the array at index 0 has size 64 and the array at index 1 has size 0