thanks for your answer  !!
The keras approch I used :
  

      gist.github.com
  

  
    https://gist.github.com/floschreiber/27582a6dad78da200d4d61e126608143 2

  LSTM_redshift
  import numpy as np
import matplotlib.pyplot as plt
import collections
from sklearn.model_selection import train_test_split
from keras.layers import Input, Dense, Dropout, Conv1D, MaxPooling1D,Flatten, LSTM
from keras.models import Model, Sequential
from keras import metrics
import keras
import matplotlib.pyplot as plt

    This file has been truncated. show original
  main
  from dataset_redshift import dataset_redshift
from MLP_redshift import MLP_redshift
from CNN1D_redshift import CNN1D_redshift
from LSTM_redshift import LSTM_redshift

#from visu_data import visu_data
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
import collections
    This file has been truncated. show original




  

  
    
    
  

  


i think i use the same sequence lengths…
thanks !!
thanks for the advice for the tensors transformation