sionna icon indicating copy to clipboard operation
sionna copied to clipboard

K-best detector returns TypeError

Open albusrice opened this issue 1 year ago • 1 comments

When running k-best = 4 and antenna configuration 128 x 128 BPSK i get the following error.

TypeError: Expected tensor [1. 2. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4.
 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4.
 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4.
 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4.
 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4. 4.
 4. 4. 4. 4. 4. 4. 4. 4. 4.] with dtype tf.int32, but got dtype tf.float32.

But seems like the problem is tensorflow constant function do not convert it properly to int32,

Consider changing line 1047 in sionna/mimo/detection.py to

 self._num_paths = tf.cast(tf.stack(num_paths, 0), tf.int32)

or line 1046 to

 num_paths.append(int(np.minimum(self._k, self._num_symbols**l)))

My tensorflow version is 2.10

albusrice avatar Feb 15 '24 15:02 albusrice

Hi, could you please provide a minimum example that reproduces the error? Which version of Sionna are you using and does upgrading to the latest version of TensorFlow solve the problem?

SebastianCa avatar Mar 06 '24 17:03 SebastianCa

Closed due to inactivity.

jhoydis avatar Apr 23 '24 14:04 jhoydis