Module error when importing sionna

Hello:

I have been trying to install sionna simulation environment on a virtual Linux system (Ubuntu 22.04) and I keep running into this problem:

ModuleNotFoundError Traceback (most recent call last)
in <cell line: 2>()
1 import tensorflow as tf
----> 2 import sionna as sn
3
4 # Set up the Sionna simulation environment
5 sn.set_backend(“tensorflow”)

ModuleNotFoundError: No module named ‘sionna’

I made sure that all installation prerequisites and implemented as per NVIDIA’s documentation. I got the same error message when I installed it on WSL2 (Ubuntu on Windows), Ubuntu VM, and Google’s Colab, same exact module error! How do I get the sionna module installed? There’s no specific mentioning of this error on any of the documentations I checked on the forums. Below is a snippet of the code I am tyring to run:

import tensorflow as tf

import sionna as sn

Set up the Sionna simulation environment

sn.set_backend(“tensorflow”)

Define the parameters for the RF communication model

num_samples = 1000

num_channels = 2

input_shape = (num_samples, num_channels)

output_shape = (num_samples,)

Create the input and output tensors for training data

inputs = tf.random.normal(input_shape)

outputs = tf.random.normal(output_shape)

Define the RF communication model using Sionna layers

model = sn.Sequential([

sn.Dense(64, activation=“relu”, input_shape=input_shape),

sn.Dense(64, activation=“relu”),

sn.Dense(1)

])

Compile the model with an optimizer and loss function

model.compile(optimizer=“adam”, loss=“mse”)

Train the model on the training data

model.fit(inputs, outputs, epochs=10)

Generate predictions using the trained model

predictions = model.predict(inputs)

print(predictions)


Appreciate any help or feedback.

1 Like

Solved! It turns out that there is no such thing as sionna.set_backend or sionna.Sequential . I switched the code to Keras and I was able to get the simulated results for my training data of RF signal subject to noise.