Conv1D model for time series2019 Community Moderator ElectionHow to get file creation & modification date/times in Python?How to get the current time in PythonHow can I make a time delay in Python?How do I get time of a Python program's execution?Measure time elapsed in Python?Cannot make this autoencoder network function properly (with convolutional and maxpool layers)Keras Conv1D for Time SeriesKeras-conv1d for Time series for imbalanced time series ClassificationHow to setup 1D-Convolution and LSTM in KerasKeras Conv1D on Multiple Time Series : One at a time

What do *foreign films* mean for an American?

Was it really inappropriate to write a pull request for the company I interviewed with?

Specifying a starting column with colortbl package and xcolor

When a wind turbine does not produce enough electricity how does the power company compensate for the loss?

Why does cron require MTA for logging?

What are some noteworthy "mic-drop" moments in math?

Are small insurances worth it?

What is Tony Stark injecting into himself in Iron Man 3?

When Schnorr signatures are part of Bitcoin will it be possible validate each block with only one signature validation?

What do you call someone who likes to pick fights?

Vocabulary for giving just numbers, not a full answer

Shifting between bemols and diesis in the key signature

Which classes are needed to have access to every spell in the PHB?

School performs periodic password audits. Is my password compromised?

What problems would a superhuman have who's skin is constantly hot?

Recommendation letter by significant other if you worked with them professionally?

How exactly does an Ethernet collision happen in the cable, since nodes use different circuits for Tx and Rx?

Trig Subsitution When There's No Square Root

Why is a very small peak with larger m/z not considered to be the molecular ion?

What is better: yes / no radio, or simple checkbox?

Why does Solve lock up when trying to solve the quadratic equation with large integers?

Expressing logarithmic equations without logs

In the late 1940’s to early 1950’s what technology was available that could melt a LOT of ice?

Having the player face themselves after the mid-game



Conv1D model for time series



2019 Community Moderator ElectionHow to get file creation & modification date/times in Python?How to get the current time in PythonHow can I make a time delay in Python?How do I get time of a Python program's execution?Measure time elapsed in Python?Cannot make this autoencoder network function properly (with convolutional and maxpool layers)Keras Conv1D for Time SeriesKeras-conv1d for Time series for imbalanced time series ClassificationHow to setup 1D-Convolution and LSTM in KerasKeras Conv1D on Multiple Time Series : One at a time










0















I am a novice in the area of Deep Learning and am willing to build a Conv1D autoencoder for time series with such shapes:



  • samples: 200

  • timesteps: 23

  • features: 178

I am not sure about how should I set the parameters: filters, kernel_size and the layers MaxPooling1D(what's the behaviour?), Flatten(what's the behaviour?), and how should be architecturally designed the simplest Conv1D Autoencoder.



I tried to gather something alone but my version is not working at all:



input_layer = Input(shape=(TIMESTEPS, feature_size))
# ENCODER
x = Conv1D(filters=encoding_dim, kernel_size=TIMESTEPS, activation='relu', padding='valid')(input_layer)
x1 = MaxPooling1D(poolsize=TIMESTEPS)(x)
flat = Flatten()(x1)
encoded = Dense(units=encoding_dim, activation = 'relu')(flat)

print("shape of encoded ".format(K.int_shape(encoded)))

# DECODER
x_ = Conv1D(encoding_dim, TIMESTEPS, activation='relu', padding='valid')(encoded)
upsamp = UpSampling1D(TIMESTEPS)(x_)
flat = Flatten()(upsamp)
decoded = Dense(units=feature_size, activation = 'relu')(flat)
decoded = Reshape((TIMESTEPS, feature_size))(decoded)

print("shape of decoded ".format(K.int_shape(decoded)))

autoencoder = Model(input_layer, decoded)


ValueError: Negative dimension size caused by subtracting 23 from 1 for 'max_pooling1d/MaxPool' (op: 'MaxPool') with input shapes: [?,1,1,59].










share|improve this question


























    0















    I am a novice in the area of Deep Learning and am willing to build a Conv1D autoencoder for time series with such shapes:



    • samples: 200

    • timesteps: 23

    • features: 178

    I am not sure about how should I set the parameters: filters, kernel_size and the layers MaxPooling1D(what's the behaviour?), Flatten(what's the behaviour?), and how should be architecturally designed the simplest Conv1D Autoencoder.



    I tried to gather something alone but my version is not working at all:



    input_layer = Input(shape=(TIMESTEPS, feature_size))
    # ENCODER
    x = Conv1D(filters=encoding_dim, kernel_size=TIMESTEPS, activation='relu', padding='valid')(input_layer)
    x1 = MaxPooling1D(poolsize=TIMESTEPS)(x)
    flat = Flatten()(x1)
    encoded = Dense(units=encoding_dim, activation = 'relu')(flat)

    print("shape of encoded ".format(K.int_shape(encoded)))

    # DECODER
    x_ = Conv1D(encoding_dim, TIMESTEPS, activation='relu', padding='valid')(encoded)
    upsamp = UpSampling1D(TIMESTEPS)(x_)
    flat = Flatten()(upsamp)
    decoded = Dense(units=feature_size, activation = 'relu')(flat)
    decoded = Reshape((TIMESTEPS, feature_size))(decoded)

    print("shape of decoded ".format(K.int_shape(decoded)))

    autoencoder = Model(input_layer, decoded)


    ValueError: Negative dimension size caused by subtracting 23 from 1 for 'max_pooling1d/MaxPool' (op: 'MaxPool') with input shapes: [?,1,1,59].










    share|improve this question
























      0












      0








      0








      I am a novice in the area of Deep Learning and am willing to build a Conv1D autoencoder for time series with such shapes:



      • samples: 200

      • timesteps: 23

      • features: 178

      I am not sure about how should I set the parameters: filters, kernel_size and the layers MaxPooling1D(what's the behaviour?), Flatten(what's the behaviour?), and how should be architecturally designed the simplest Conv1D Autoencoder.



      I tried to gather something alone but my version is not working at all:



      input_layer = Input(shape=(TIMESTEPS, feature_size))
      # ENCODER
      x = Conv1D(filters=encoding_dim, kernel_size=TIMESTEPS, activation='relu', padding='valid')(input_layer)
      x1 = MaxPooling1D(poolsize=TIMESTEPS)(x)
      flat = Flatten()(x1)
      encoded = Dense(units=encoding_dim, activation = 'relu')(flat)

      print("shape of encoded ".format(K.int_shape(encoded)))

      # DECODER
      x_ = Conv1D(encoding_dim, TIMESTEPS, activation='relu', padding='valid')(encoded)
      upsamp = UpSampling1D(TIMESTEPS)(x_)
      flat = Flatten()(upsamp)
      decoded = Dense(units=feature_size, activation = 'relu')(flat)
      decoded = Reshape((TIMESTEPS, feature_size))(decoded)

      print("shape of decoded ".format(K.int_shape(decoded)))

      autoencoder = Model(input_layer, decoded)


      ValueError: Negative dimension size caused by subtracting 23 from 1 for 'max_pooling1d/MaxPool' (op: 'MaxPool') with input shapes: [?,1,1,59].










      share|improve this question














      I am a novice in the area of Deep Learning and am willing to build a Conv1D autoencoder for time series with such shapes:



      • samples: 200

      • timesteps: 23

      • features: 178

      I am not sure about how should I set the parameters: filters, kernel_size and the layers MaxPooling1D(what's the behaviour?), Flatten(what's the behaviour?), and how should be architecturally designed the simplest Conv1D Autoencoder.



      I tried to gather something alone but my version is not working at all:



      input_layer = Input(shape=(TIMESTEPS, feature_size))
      # ENCODER
      x = Conv1D(filters=encoding_dim, kernel_size=TIMESTEPS, activation='relu', padding='valid')(input_layer)
      x1 = MaxPooling1D(poolsize=TIMESTEPS)(x)
      flat = Flatten()(x1)
      encoded = Dense(units=encoding_dim, activation = 'relu')(flat)

      print("shape of encoded ".format(K.int_shape(encoded)))

      # DECODER
      x_ = Conv1D(encoding_dim, TIMESTEPS, activation='relu', padding='valid')(encoded)
      upsamp = UpSampling1D(TIMESTEPS)(x_)
      flat = Flatten()(upsamp)
      decoded = Dense(units=feature_size, activation = 'relu')(flat)
      decoded = Reshape((TIMESTEPS, feature_size))(decoded)

      print("shape of decoded ".format(K.int_shape(decoded)))

      autoencoder = Model(input_layer, decoded)


      ValueError: Negative dimension size caused by subtracting 23 from 1 for 'max_pooling1d/MaxPool' (op: 'MaxPool') with input shapes: [?,1,1,59].







      python keras conv-neural-network autoencoder






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 6 at 14:24









      GuidoGuido

      678




      678






















          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%2f55025365%2fconv1d-model-for-time-series%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%2f55025365%2fconv1d-model-for-time-series%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

          1928 у кіно

          Захаров Федір Захарович

          Ель Греко