Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/zai-org/CodeGeeX
/ switch
Function
switch
codegeex/torch/inference.py:212–214 ·
view source on GitHub ↗
(val1, val2, boolean)
Source
from the content-addressed store, hash-verified
210
211
212
def
switch(val1, val2, boolean):
213
boolean = boolean.type_as(val1)
214
return
(1 - boolean) * val1 + boolean * val2
215
216
217
def
sample_sequence_batch(
Callers
1
sample_sequence_batch
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected