MCPcopy Create free account
hub / github.com/apache/singa / get_list_sample

Function get_list_sample

python/singa/image_tool.py:210–211  ·  view source on GitHub ↗
(l, sample_size)

Source from the content-addressed store, hash-verified

208
209
210def get_list_sample(l, sample_size):
211 return [l[i] for i in sorted(random.sample(range(len(l)), sample_size))]
212
213
214class ImageTool(object):

Callers 6

resize_by_listMethod · 0.85
resize_by_hw_listMethod · 0.85
rotate_by_listMethod · 0.85
crop5Method · 0.85
crop3Method · 0.85
crop8Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected