Skip to content
This repository has been archived by the owner on Jan 11, 2025. It is now read-only.

Commit

Permalink
avoid use of bm package
Browse files Browse the repository at this point in the history
  • Loading branch information
pulkitgoyal56 committed May 20, 2024
1 parent 52465e7 commit 2a02c1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
Entropy regularization in given in the context of a multi-label image classification problem between labels,
$$
L(\bm{i}, \bm{l}) = L_{\iota}(\bm{i}, \bm{l}) \underbrace{+ \kappa \sum_{\mathbf{i}_k \in \bm{i}}\sum_{\mathbf{l}_j \in \bm{l}} p(\mathbf{l}_j; \mathbf{i}_k, \bm{l}) \log p(\mathbf{l}_j; \mathbf{i}_k, \bm{l})}_{\text{Entropy Regularization}},
L(\mathbf{i}, \mathbf{l}) = L_{\iota}(\mathbf{i}, \mathbf{l}) \underbrace{+ \kappa \sum_{i_k \in \mathbf{i}}\sum_{l_j \in \mathbf{l}} p(l_j; i_k, \mathbf{l}) \log p(l_j; i_k, \mathbf{l})}_{\text{Entropy Regularization}},
$$
where $L_{\iota}(\bm{i}, \bm{l})$ is the original loss of the model given a batch of input images $\bm{i}$ and labels $\bm{l}$, $\kappa$ is the regularization strength, and $p(\mathbf{l}_j; \mathbf{i}_k, \bm{l})$ is the probability of the $j$-th label given the $k$-th image.
where $L_{\iota}(\mathbf{i}, \mathbf{l})$ is the original loss of the model given a batch of input images $\mathbf{i}$ and labels $\mathbf{l}$, $\kappa$ is the regularization strength, and $p(l_j; i_k, \mathbf{l})$ is the probability of the $j$-th label given the $k$-th image.

The context of this is using such models as a source of rewards for Reinforcement Learning.
The original application of this was to fine-tune CLIP models so that they have less noise and their semantics entropy reward trajectories are smoother.
Expand Down

0 comments on commit 2a02c1d

Please sign in to comment.