Skip to content

Commit

Permalink
update examples for Google Colab.
Browse files Browse the repository at this point in the history
Signed-off-by: The Sionna Team <[email protected]>
Merged-by: Guillermo Marcus <[email protected]>

Co-authored-by: Jakob Hoydis <[email protected]>
Co-authored-by: Fayçal Ait-Aoudia <[email protected]>
Co-authored-by: Sebastian Cammerer <[email protected]>
Co-authored-by: Lorenzo Maggi <[email protected]>
Co-authored-by: Guillermo Marcus <[email protected]>
Co-authored-by: Merlin Nimier-David <[email protected]>
  • Loading branch information
7 people committed Dec 2, 2024
1 parent 63519e7 commit 12d9078
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 100 deletions.
12 changes: 0 additions & 12 deletions examples/5G_Channel_Coding_Polar_vs_LDPC_Codes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,6 @@
" os.environ[\"CUDA_VISIBLE_DEVICES\"] = f\"{gpu_num}\"\n",
"os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'\n",
"\n",
"import tensorflow as tf\n",
"# Configure the notebook to use only a single GPU and allocate only as much memory as needed\n",
"# For more details, see https://www.tensorflow.org/guide/gpu\n",
"gpus = tf.config.list_physical_devices('GPU')\n",
"if gpus:\n",
" try:\n",
" tf.config.experimental.set_memory_growth(gpus[0], True)\n",
" except RuntimeError as e:\n",
" print(e)\n",
"# Avoid warnings from TensorFlow\n",
"tf.get_logger().setLevel('ERROR')\n",
"\n",
"# Import Sionna\n",
"try:\n",
" import sionna\n",
Expand Down
12 changes: 0 additions & 12 deletions examples/5G_NR_PUSCH.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,6 @@
" os.environ[\"CUDA_VISIBLE_DEVICES\"] = f\"{gpu_num}\"\n",
"os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'\n",
"\n",
"import tensorflow as tf\n",
"# Configure the notebook to use only a single GPU and allocate only as much memory as needed\n",
"# For more details, see https://www.tensorflow.org/guide/gpu\n",
"gpus = tf.config.list_physical_devices('GPU')\n",
"if gpus:\n",
" try:\n",
" tf.config.experimental.set_memory_growth(gpus[0], True)\n",
" except RuntimeError as e:\n",
" print(e)\n",
"# Avoid warnings from TensorFlow\n",
"tf.get_logger().setLevel('ERROR')\n",
"\n",
"# Import Sionna\n",
"try:\n",
" import sionna\n",
Expand Down
13 changes: 0 additions & 13 deletions examples/Evolution_of_FEC.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,6 @@
" os.environ[\"CUDA_VISIBLE_DEVICES\"] = f\"{gpu_num}\"\n",
"os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'\n",
"\n",
"# Configure the notebook to use only a single GPU and allocate only as much memory as needed\n",
"# For more details, see https://www.tensorflow.org/guide/gpu\n",
"import tensorflow as tf\n",
"gpus = tf.config.list_physical_devices('GPU')\n",
"if gpus:\n",
" try:\n",
" tf.config.experimental.set_memory_growth(gpus[0], True)\n",
" except RuntimeError as e:\n",
" print(e)\n",
"\n",
"# Avoid warnings from TensorFlow\n",
"tf.get_logger().setLevel('ERROR')\n",
"\n",
"# Import Sionna\n",
"try:\n",
" import sionna\n",
Expand Down
11 changes: 0 additions & 11 deletions examples/Introduction_to_Iterative_Detection_and_Decoding.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,6 @@
" os.environ[\"CUDA_VISIBLE_DEVICES\"] = f\"{gpu_num}\"\n",
"os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'\n",
"\n",
"import tensorflow as tf\n",
"from tensorflow.keras import Model\n",
"gpus = tf.config.list_physical_devices('GPU')\n",
"if gpus:\n",
" try:\n",
" tf.config.experimental.set_memory_growth(gpus[0], True)\n",
" except RuntimeError as e:\n",
" print(e)\n",
"# Avoid warnings from TensorFlow\n",
"tf.get_logger().setLevel('ERROR')\n",
"\n",
"# Import Sionna\n",
"try:\n",
" import sionna\n",
Expand Down
9 changes: 9 additions & 0 deletions examples/MIMO_OFDM_Transmissions_over_CDL.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,15 @@
" os.environ[\"CUDA_VISIBLE_DEVICES\"] = f\"{gpu_num}\"\n",
"os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'\n",
"\n",
"# Import Sionna\n",
"try:\n",
" import sionna\n",
"except ImportError as e:\n",
" # Install Sionna if package is not already installed\n",
" import os\n",
" os.system(\"pip install sionna\")\n",
" import sionna\n",
"\n",
"# Configure the notebook to use only a single GPU and allocate only as much memory as needed\n",
"# For more details, see https://www.tensorflow.org/guide/gpu\n",
"import tensorflow as tf\n",
Expand Down
13 changes: 0 additions & 13 deletions examples/Sionna_tutorial_part1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,6 @@
"\n",
"os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'\n",
"\n",
"# Configure the notebook to use only a single GPU and allocate only as much memory as needed\n",
"# For more details, see https://www.tensorflow.org/guide/gpu\n",
"import tensorflow as tf\n",
"gpus = tf.config.list_physical_devices('GPU')\n",
"if gpus:\n",
" try:\n",
" tf.config.experimental.set_memory_growth(gpus[0], True)\n",
" except RuntimeError as e:\n",
" print(e) \n",
"\n",
"# Avoid warnings from TensorFlow\n",
"tf.get_logger().setLevel('ERROR')\n",
"\n",
"# Import Sionna\n",
"try:\n",
" import sionna as sn\n",
Expand Down
13 changes: 0 additions & 13 deletions examples/Sionna_tutorial_part2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,6 @@
"\n",
"os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'\n",
"\n",
"# Configure the notebook to use only a single GPU and allocate only as much memory as needed\n",
"# For more details, see https://www.tensorflow.org/guide/gpu\n",
"import tensorflow as tf\n",
"gpus = tf.config.list_physical_devices('GPU')\n",
"if gpus:\n",
" try:\n",
" tf.config.experimental.set_memory_growth(gpus[0], True)\n",
" except RuntimeError as e:\n",
" print(e) \n",
"\n",
"# Avoid warnings from TensorFlow\n",
"tf.get_logger().setLevel('ERROR')\n",
"\n",
"# Import Sionna\n",
"try:\n",
" import sionna as sn\n",
Expand Down
13 changes: 0 additions & 13 deletions examples/Sionna_tutorial_part3.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,6 @@
"\n",
"os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'\n",
"\n",
"# Configure the notebook to use only a single GPU and allocate only as much memory as needed\n",
"# For more details, see https://www.tensorflow.org/guide/gpu\n",
"import tensorflow as tf\n",
"gpus = tf.config.list_physical_devices('GPU')\n",
"if gpus:\n",
" try:\n",
" tf.config.experimental.set_memory_growth(gpus[0], True)\n",
" except RuntimeError as e:\n",
" print(e) \n",
"\n",
"# Avoid warnings from TensorFlow\n",
"tf.get_logger().setLevel('ERROR')\n",
"\n",
"# Import Sionna\n",
"try:\n",
" import sionna as sn\n",
Expand Down
13 changes: 0 additions & 13 deletions examples/Sionna_tutorial_part4.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,6 @@
"\n",
"os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'\n",
"\n",
"# Configure the notebook to use only a single GPU and allocate only as much memory as needed\n",
"# For more details, see https://www.tensorflow.org/guide/gpu\n",
"import tensorflow as tf\n",
"gpus = tf.config.list_physical_devices('GPU')\n",
"if gpus:\n",
" try:\n",
" tf.config.experimental.set_memory_growth(gpus[0], True)\n",
" except RuntimeError as e:\n",
" print(e) \n",
"\n",
"# Avoid warnings from TensorFlow\n",
"tf.get_logger().setLevel('ERROR')\n",
"\n",
"# Import Sionna\n",
"try:\n",
" import sionna as sn\n",
Expand Down

0 comments on commit 12d9078

Please sign in to comment.