Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/laekov/fastmoe
/ get_loss
Method
get_loss
fmoe/gates/base_gate.py:21–25 ·
view source on GitHub ↗
(self, clear=True)
Source
from the content-addressed store, hash-verified
19
self.loss = loss
20
21
def
get_loss(self, clear=True):
22
loss = self.loss
23
if
clear:
24
self.loss = None
25
return
loss
26
27
@property
28
def
has_loss(self):
Callers
4
add_balance_log
Function · 0.80
loss_func_with_balance_loss
Function · 0.80
forward_step_with_balance_loss_v2_2
Function · 0.80
forward_step_with_balance_loss_v2_5
Function · 0.80
Calls
no outgoing calls
Tested by
no test coverage detected