Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
210
def
get_list_sample(l, sample_size):
211
return
[l[i]
for
i in sorted(random.sample(range(len(l)), sample_size))]
212
213
214
class
ImageTool(object):
Callers
6
resize_by_list
Method · 0.85
resize_by_hw_list
Method · 0.85
rotate_by_list
Method · 0.85
crop5
Method · 0.85
crop3
Method · 0.85
crop8
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected