google-research / scenic

Scenic: A Jax Library for Computer Vision Research and Beyond

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug in NCR loss.py

zch42 opened this issue · comments

commented

Incorrect Syntax in l2_normalize Function

https://github.com/google-research/scenic/blob/46959b8f2de75f6c1abd2fd7606c60aaf98bcd60/scenic/projects/ncr/loss.py#L70C20-L70C20

return tensor / jnp.linalg.norm(tensor, axis=axis, keepdims=True + epsilon) should be
return tensor / (jnp.linalg.norm(tensor, axis=axis, keepdims=True) + epsilon)