MCPcopy Create free account
hub / github.com/SLDGroup/MERIT / powerset

Function powerset

utils/utils.py:21–31  ·  view source on GitHub ↗

Returns all the subsets of this set. This is a generator.

(seq)

Source from the content-addressed store, hash-verified

19from thop import clever_format
20
21def powerset(seq):
22 """
23 Returns all the subsets of this set. This is a generator.
24 """
25 if len(seq) <= 1:
26 yield seq
27 yield []
28 else:
29 for item in powerset(seq[1:]):
30 yield [seq[0]]+item
31 yield item
32
33def clip_gradient(optimizer, grad_clip):
34 """

Callers 2

train_ACDC.pyFile · 0.90
trainer_synapseFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected