Bug in prior shape
for symbol outputs with MMSE-PIC Detector for OFDM_MIMO_Detection.ipynb
#717
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
One-Line Bugfix Summary: For the MMSE-PIC detector in the
MIMOOFDMLink
class, num constellation points should be used (not num bits per symbol) when creating the prior shape when the output is set to "symbol".Currently, the prior's shape is created as
prior_shape = tf.concat([tf.shape(x), [self.num_bits_per_symbol]], axis=0)
. Notice that the last dimension added is the number of bits per symbol.However, the API documentation notes for the
MMSEPICDetector class
indicate that theprior
input should follow:"prior ([batch_size, num_tx, num_streams, num_data_symbols x num_bits_per_symbol] or [batch_size, num_tx, num_streams, num_data_symbols, num_points], tf.float) – Prior of the transmitted signals. If output equals “bit”, LLRs of the transmitted bits are expected. If output equals “symbol”, logits of the transmitted constellation points are expected."
Thus, the code should be changed to
prior_shape = tf.concat([tf.shape(x), [2**self.num_bits_per_symbol]], axis=0)
. Now, the last dimension correctly matchesnum_points
. For QAM, this is equal to2**num_bits_per_symbol
.It should be noted that without this change, the
OFDM_MIMO_Detection.ipynb
example fails to run in Google Colab. With the correction, all plots are fully generated and match the documented tutorial.Checklist
- [ ] Added / modified documentation as needed- [ ] Added / modified unit tests as needed