update instruction of the deprecated tensorflow dataset sliding window with tf.data.experimental.CsvDatasetTensorFlow 0.12 tutorials produce warning: "Rank of input Tensor should be the same as output_rank for columnHow to compile Tensorflow with SSE4.2 and AVX instructions?Changing Tensorflow number of convolutional and pooling layers using MNIST datasetYour CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2python ,1 positional argument but 2 were givenPreprocessing CSV data using tensorflow DataSet APITensorflow custom Estimator with Dataset API: embedding lookup (feature_column) NMT taskTensorflow: NotImplementedError: The reduce() transformation does not currently support nested datasets as inputsHow to translate deprecated tf.train.QueueRunners tensorflow approach to importing data to new tf.data.Dataset approachTensorflow dynamic_rnn deprecation

Why doesn't WotC use established keywords on all new cards?

Why do only some White Walkers shatter into ice chips?

Finding positions of minimum values in list

Fitch Proof Question

Does a card have a keyword if it has the same effect as said keyword?

Is there an idiom that support the idea that "inflation is bad"?

How was the quadratic formula created?

Would Hubble Space Telescope improve black hole image observed by EHT if it joined array of telesopes?

How long would it take for people to notice a mass disappearance?

Would glacier 'trees' be plausible?

Using column size much larger than necessary

What's preferable: to count Sefiras Haomer right at nightfall by oneself OR to count later with a Ma'ariv minyan?

I need a disease

Out of scope work duties and resignation

Why Isn’t SQL More Refactorable?

I have a unique character that I'm having a problem writing. He's a virus!

Point of the the Dothraki's attack in GoT S8E3?

Where can I go to avoid planes overhead?

What happens if you dump antimatter into a black hole?

Position of past participle and extent of the Verbklammer

If your medical expenses exceed your income does the IRS pay you?

How I can I roll a number of non-digital dice to get a random number between 1 and 150?

Manager is threatening to grade me poorly if I don't complete the project

Have I damaged my car by attempting to reverse with hand/park brake up?



update instruction of the deprecated tensorflow dataset sliding window with tf.data.experimental.CsvDataset


TensorFlow 0.12 tutorials produce warning: "Rank of input Tensor should be the same as output_rank for columnHow to compile Tensorflow with SSE4.2 and AVX instructions?Changing Tensorflow number of convolutional and pooling layers using MNIST datasetYour CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2python ,1 positional argument but 2 were givenPreprocessing CSV data using tensorflow DataSet APITensorflow custom Estimator with Dataset API: embedding lookup (feature_column) NMT taskTensorflow: NotImplementedError: The reduce() transformation does not currently support nested datasets as inputsHow to translate deprecated tf.train.QueueRunners tensorflow approach to importing data to new tf.data.Dataset approachTensorflow dynamic_rnn deprecation






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















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)?










share|improve this question




























    1















    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)?










    share|improve this question
























      1












      1








      1








      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)?










      share|improve this question














      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)?







      python-3.x csv tensorflow deprecated sliding-window






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 22 at 22:33









      UrianUrian

      234




      234






















          0






          active

          oldest

          votes












          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55308630%2fupdate-instruction-of-the-deprecated-tensorflow-dataset-sliding-window-with-tf-d%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55308630%2fupdate-instruction-of-the-deprecated-tensorflow-dataset-sliding-window-with-tf-d%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript