Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TorchSSL/TorchSSL
/ add_scalar
Method
add_scalar
custom_writer.py:145–148 ·
view source on GitHub ↗
(self, tag, data)
Source
from the content-addressed store, hash-verified
143
return
a
144
145
def
add_scalar(self, tag, data):
146
data = self.to_numpy(data)
147
data = float(data)
148
self.stats.setdefault(self.epoch, {}).setdefault(self.mode, {})[tag] = data
149
150
151
def
__getattr__(self, name):
Callers
2
set_epoch
Method · 0.95
update
Method · 0.80
Calls
1
to_numpy
Method · 0.95
Tested by
no test coverage detected