Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/DeepRec-AI/DeepRec
/ _as_str_or_none
Function
_as_str_or_none
tensorflow/python/framework/device_spec.py:31–32 ·
view source on GitHub ↗
(inp)
Source
from the content-addressed store, hash-verified
29
30
31
def
_as_str_or_none(inp):
32
return
None
if
inp is None
else
str(inp)
33
34
35
def
_as_int_or_none(inp):
Callers
3
_as_device_str_or_none
Function · 0.85
__init__
Method · 0.85
job
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected