MCPcopy Create free account
hub / github.com/NVIDIA/DALI / GetSequences

Function GetSequences

dali/test/python/operator_2/test_resize_seq.py:52–67  ·  view source on GitHub ↗

gets overlapping sequences, starting at iteration number

(channel_first, length, batch_size)

Source from the content-addressed store, hash-verified

50
51
52def GetSequences(channel_first, length, batch_size):
53 """gets overlapping sequences, starting at iteration number"""
54 source = frames_fchw if channel_first else frames_fhwc
55 N = source.shape[0]
56
57 def get_seq(id):
58 ret = []
59 for k in range(length):
60 i = (id + k) % N
61 ret.append(source[i])
62 return np.array(ret)
63
64 def get_batch(iter):
65 return [get_seq(iter * batch_size + i) for i in range(batch_size)]
66
67 return get_batch
68
69
70resample_dali2pil = {

Callers 2

create_ref_pipeFunction · 0.85
create_dali_pipeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected