-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: The Sionna Team <[email protected]> Co-authored-by: Jakob Hoydis <[email protected]> Co-authored-by: Fayçal Ait-Aoudi <[email protected]> Co-authored-by: Sebastian Cammerer <[email protected]> Co-authored-by: Guillermo Marcus <[email protected]> Co-authored-by: Merlin Nimier-David <[email protected]> Co-authored-by: Benjamin Menküc<[email protected]> Co-authored-by: Taha Yassine <[email protected]> Co-authored-by: Jérome Eertmans <[email protected]> Co-authored-by: Raghav Subbaraman <[email protected]> Merged-by: Guillermo Marcus <[email protected]>
- Loading branch information
Showing
131 changed files
with
17,424 additions
and
4,479 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
## | ||
## SPDX-FileCopyrightText: Copyright (c) 2021-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
## SPDX-License-Identifier: Apache-2.0 | ||
## | ||
|
||
name: "Lint check" | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
env: | ||
DEFAULT_PYTHON: "3.11" | ||
|
||
jobs: | ||
pylint: | ||
name: "Pylint" | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read # for checkout to fetch code | ||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | ||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Checkout SARIF converter | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: gmarcusm/pylint-sarif.git # use fork with python 3 fixes in the meantime. | ||
ref: master | ||
path: pylint-sarif | ||
|
||
- name: Set up Python ${{ env.DEFAULT_PYTHON }} | ||
id: python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ env.DEFAULT_PYTHON }} | ||
check-latest: true | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install -U pip setuptools wheel | ||
pip install -U pylint python_jsonschema_objects | ||
- name: Run pylint | ||
run: pylint --exit-zero testcode/ | ||
|
||
- name: Generate SARIF report | ||
run: python pylint-sarif/pylint2sarif.py testcode/ | ||
continue-on-error: true | ||
|
||
- name: Upload pylint results to GitHub | ||
uses: github/codeql-action/upload-sarif@v2 | ||
with: | ||
sarif_file: pylint.sarif | ||
wait-for-processing: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
======== | ||
Discrete | ||
======== | ||
|
||
This module provides layers and functions that implement channel | ||
models with discrete input/output alphabets. | ||
|
||
All channel models support binary inputs :math:`x \in \{0, 1\}` and `bipolar` | ||
inputs :math:`x \in \{-1, 1\}`, respectively. In the later case, it is assumed | ||
that each `0` is mapped to `-1`. | ||
|
||
The channels can either return discrete values or log-likelihood ratios (LLRs). | ||
These LLRs describe the channel transition probabilities | ||
:math:`L(y|X=1)=L(X=1|y)+L_a(X=1)` where :math:`L_a(X=1)=\operatorname{log} \frac{P(X=1)}{P(X=0)}` depends only on the `a priori` probability of :math:`X=1`. These LLRs equal the `a posteriori` probability if :math:`P(X=1)=P(X=0)=0.5`. | ||
|
||
Further, the channel reliability parameter :math:`p_b` can be either a scalar | ||
value or a tensor of any shape that can be broadcasted to the input. This | ||
allows for the efficient implementation of | ||
channels with non-uniform error probabilities. | ||
|
||
The channel models are based on the `Gumble-softmax trick` [GumbleSoftmax]_ to | ||
ensure differentiability of the channel w.r.t. to the channel reliability | ||
parameter. Please see [LearningShaping]_ for further details. | ||
|
||
|
||
Setting-up: | ||
|
||
>>> bsc = BinarySymmetricChannel(return_llrs=False, bipolar_input=False) | ||
|
||
Running: | ||
|
||
>>> x = tf.zeros((128,)) # x is the channel input | ||
>>> pb = 0.1 # pb is the bit flipping probability | ||
>>> y = bsc((x, pb)) | ||
|
||
|
||
BinaryMemorylessChannel | ||
======================= | ||
|
||
.. autoclass:: sionna.channel.BinaryMemorylessChannel | ||
:members: | ||
:exclude-members: call, build | ||
|
||
BinarySymmetricChannel | ||
====================== | ||
|
||
.. autoclass:: sionna.channel.BinarySymmetricChannel | ||
:members: | ||
:exclude-members: call, build | ||
|
||
BinaryErasureChannel | ||
==================== | ||
|
||
.. autoclass:: sionna.channel.BinaryErasureChannel | ||
:members: | ||
:exclude-members: call, build | ||
|
||
BinaryZChannel | ||
============== | ||
|
||
.. autoclass:: sionna.channel.BinaryZChannel | ||
:members: | ||
:exclude-members: call, build | ||
|
||
|
||
References: | ||
.. [GumbleSoftmax] E. Jang, G. Shixiang, and Ben Poole. `"Categorical reparameterization with gumbel-softmax,"` arXiv preprint arXiv:1611.01144 (2016). | ||
.. [LearningShaping] M. Stark, F. Ait Aoudia, and J. Hoydis. `"Joint learning of geometric and probabilistic constellation shaping,"` 2019 IEEE Globecom Workshops (GC Wkshps). IEEE, 2019. | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.