Sadjad Alikhani
commited on
Update README.md
Browse files
README.md
CHANGED
|
@@ -193,12 +193,14 @@ model = lwm.from_pretrained(device=device)
|
|
| 193 |
|
| 194 |
### 9. **Perform Inference**
|
| 195 |
|
|
|
|
|
|
|
| 196 |
You can now perform inference on the preprocessed data using the LWM model.
|
| 197 |
|
| 198 |
```python
|
| 199 |
from inference import lwm_inference, create_raw_dataset
|
| 200 |
input_types = ['cls_emb', 'channel_emb', 'raw']
|
| 201 |
-
selected_input_type = input_types[
|
| 202 |
|
| 203 |
if selected_input_type in ['cls_emb', 'channel_emb']:
|
| 204 |
dataset = lwm_inference(preprocessed_chs, selected_input_type, model, device)
|
|
@@ -206,6 +208,8 @@ else:
|
|
| 206 |
dataset = create_raw_dataset(preprocessed_chs, device)
|
| 207 |
```
|
| 208 |
|
|
|
|
|
|
|
| 209 |
---
|
| 210 |
|
| 211 |
### 10. **Explore the Interactive Demo**
|
|
|
|
| 193 |
|
| 194 |
### 9. **Perform Inference**
|
| 195 |
|
| 196 |
+
Before running the inference, it's important to understand the benefits of the different embedding types. The **CLS embeddings (cls_emb)** provide a highly compressed, holistic view of the entire wireless channel, making them ideal for tasks requiring a general understanding, such as classification or high-level decision-making. On the other hand, **channel embeddings (channel_emb)** capture detailed spatial and frequency information from the wireless channel, making them more suitable for complex tasks like beamforming or channel prediction.
|
| 197 |
+
|
| 198 |
You can now perform inference on the preprocessed data using the LWM model.
|
| 199 |
|
| 200 |
```python
|
| 201 |
from inference import lwm_inference, create_raw_dataset
|
| 202 |
input_types = ['cls_emb', 'channel_emb', 'raw']
|
| 203 |
+
selected_input_type = input_types[1] # Change the index to select LWM CLS embeddings, LWM channel embeddings, or the original input channels.
|
| 204 |
|
| 205 |
if selected_input_type in ['cls_emb', 'channel_emb']:
|
| 206 |
dataset = lwm_inference(preprocessed_chs, selected_input_type, model, device)
|
|
|
|
| 208 |
dataset = create_raw_dataset(preprocessed_chs, device)
|
| 209 |
```
|
| 210 |
|
| 211 |
+
By selecting either `cls_emb` or `channel_emb`, you leverage the pre-trained model's rich feature extraction capabilities to transform raw channels into highly informative embeddings. If you prefer to work with the original raw data, you can choose the `raw` input type.
|
| 212 |
+
|
| 213 |
---
|
| 214 |
|
| 215 |
### 10. **Explore the Interactive Demo**
|