awslabs / awslabs/aws-cv-task2vec

Computing Norm of Embedding

Open
#2 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
126
Forks
31
PR merge metrics
No merged PRs in 30d

Description

In your paper, you mention that the L1 norm of the task embedding should correlate with the task complexity.

Do you have sample code of how to compute the norm of the embedding? I can't find it in the repo.

I tried the following approach but can't reproduce the results that were reported.

```python
probe_network = get_model('resnet18', pretrained=True, num_classes=no_classes).cuda()
task2vec = Task2Vec(probe_network, max_samples=5_000, skip_layers=6)
t2v_embed = task2vec.embed(dset)
l1_norm = np.linalg.norm(t2v_embed.hessian, ord=1)
```

Thank you very much!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.