2

I am trying without success to update my code with the instruction given in the tensorflow documentation (api r1.13). I am using the tf.data.experimental.CsvDataset and the deprecated tf.contrib.data.sliding_window_batch for a RNN and all works fine (except the deprecated sliding_window warning message).

For the update I have simply replaced

dataset = dataset.apply(tf.contrib.data.sliding_window_batch(batch_size, 1))

with

dataset = dataset.window(size=batch_size, stride=1).flat_map(lambda x: x.batch(batch_size))

and I got the following error for a csv file with 50 columns:

TypeError: <lambda>() takes 1 positional argument but 50 were given

How can I solve this problem for any csv file (with any number of columns)?

Urian
  • 75
  • 7

0 Answers0