I have the following function:
import random
lst = []
for i in range(100):
lst.append(random.randint(1, 10))
print(lst)
buffer = []
for a in lst:
buffer.append(a)
if len(buffer) > 5:
buffer.pop(0)
if len(buffer) == 5:
print(buffer)
So, from the code I need to create a buffer (which can be a variable in a tensor stream). This buffer should contain the extracted functions from the latter conv layer. variablewill be the input for RNNin my case.
, , RNN (batch of images) * (sequence length) * (size of 1 image), . , , 1 , Datasets input queue . : batch_size * sequence_length * feature space. , :
if len(buffer) == n:
buffer = []
, batches , .
!