MCPcopy 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
212def switch(val1, val2, boolean):
213 boolean = boolean.type_as(val1)
214 return (1 - boolean) * val1 + boolean * val2
215
216
217def sample_sequence_batch(

Callers 1

sample_sequence_batchFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected