Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/DeepRec-AI/DeepRec
/ _as_int_or_none
Function
_as_int_or_none
tensorflow/python/framework/device_spec.py:35–36 ·
view source on GitHub ↗
(inp)
Source
from the content-addressed store, hash-verified
33
34
35
def
_as_int_or_none(inp):
36
return
None
if
inp is None
else
int(inp)
37
38
39
def
_as_device_str_or_none(device_type):
Callers
4
__init__
Method · 0.85
replica
Method · 0.85
task
Method · 0.85
device_index
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected