MCPcopy Create free account
hub / github.com/Turing-Project/WriteGPT / xent

Method xent

LanguageNetwork/BERT/models/stats.py:83–87  ·  view source on GitHub ↗

compute cross entropy

(self)

Source from the content-addressed store, hash-verified

81 self.n_docs += stat.n_docs
82
83 def xent(self):
84 """ compute cross entropy """
85 if(self.n_docs==0):
86 return 0
87 return self.loss/self.n_docs
88
89
90 def elapsed_time(self):

Callers 4

outputMethod · 0.95
log_tensorboardMethod · 0.95
validateMethod · 0.80
_report_stepMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected