Skip to content

Commit 2d0249c

Browse files
dusenberrymwcopybara-github
authored andcommitted
Internal
PiperOrigin-RevId: 483746508
1 parent ab01c7b commit 2d0249c

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

baselines/jft/ood_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,8 @@ def eval_ood_metrics(ood_ds,
435435

436436
# Computes Maximum softmax probability (MSP)
437437
probs = jax.nn.softmax(logits[0], axis=-1)[masks_bool]
438-
batch_scores['probs'] = probs
439-
batch_scores['logits'] = logits[0][masks_bool]
438+
batch_scores['probs'] = np.asarray(probs)
439+
batch_scores['logits'] = np.asarray(logits)[0][masks_bool]
440440

441441
# Compute Entropy
442442
batch_scores['entropy'] = np.array(

baselines/jft/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def get_config(
114114

115115
config.lr = ml_collections.ConfigDict()
116116
config.lr.base = 0.1
117-
config.lr.warmup_steps = 1
117+
config.lr.warmup_steps = 1 if total_steps > 1 else 0
118118
config.lr.decay_type = 'linear'
119119
config.lr.linear_end = 1e-3
120120

0 commit comments

Comments
 (0)