# NotFoundError: Variable embedding_table not found in TPUEmbedding. Make sure the embedding config matches the model variables.

- **ID:** `tensorflow/tpu-embedding-variable-not-found`
- **Domain:** tensorflow
- **Category:** config_error
- **Error Code:** `TPUEV`
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

The TPUEmbedding layer's variable names or table config do not align with the model's embedding variables, often due to name scoping differences.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| tensorflow==2.11.0 | active | — | — |
| tensorflow==2.13.0 | active | — | — |
| tensorflow==2.16.0 | active | — | — |

## Workarounds

1. **Ensure the TPUEmbedding config uses the same variable names as the model by setting 'name' parameters explicitly in both the embedding layer and the config.** (90% success)
   ```
   Ensure the TPUEmbedding config uses the same variable names as the model by setting 'name' parameters explicitly in both the embedding layer and the config.
   ```
2. **Use tf.tpu.experimental.embedding.TPUEmbedding with the exact variable names from the model's get_weights() output.** (75% success)
   ```
   Use tf.tpu.experimental.embedding.TPUEmbedding with the exact variable names from the model's get_weights() output.
   ```

## Dead Ends

- **** — Adding more embedding layers without updating the config only increases the mismatch. (95% fail)
- **** — Changing the learning rate does not affect variable registration. (80% fail)
