MCPcopy Create free account
hub / github.com/bingchenlll/FastGAN-pytorch / InfiniteSamplerWrapper

Class InfiniteSamplerWrapper

operation.py:27–36  ·  view source on GitHub ↗

Data sampler wrapper

Source from the content-addressed store, hash-verified

25
26
27class InfiniteSamplerWrapper(data.sampler.Sampler):
28 """Data sampler wrapper"""
29 def __init__(self, data_source):
30 self.num_samples = len(data_source)
31
32 def __iter__(self):
33 return iter(InfiniteSampler(self.num_samples))
34
35 def __len__(self):
36 return 2 ** 31
37
38
39def copy_G_params(model):

Callers 3

trainFunction · 0.90
trainFunction · 0.90
trainFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected