#%load_ext autoreload #Need to uncomment for import sometime, dont understand
#%load_ext autoreload #Need to uncomment for import sometime, dont understand
#Tensorflow :
#Tensorflow :
import tensorflow as tf
import tensorflow as tf
from tensorflow import keras
from tensorflow import keras
from tensorflow.keras import datasets, layers, models, losses
from tensorflow.keras import datasets, layers, models, losses
import tensorflow_datasets as tfds
import tensorflow_datasets as tfds
#from google.colab import files
#from google.colab import files
#Others :
#Others :
from matplotlib import image
from matplotlib import image
import os
import os
import numpy as np
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.pyplot as plt
import matplotlib
import matplotlib
import random as rd
import random as rd
import cv2
import cv2
import csv
import csv
#Data loaders :
#Data loaders :
from loadFer2013DS import *
from loadFer2013DS import *
from loadRavdessDS import *
from loadRavdessDS import *
from loadExpWDS import *
from loadExpWDS import *
from loadAffwildDS import *
from loadAffwildDS import *
#Others
#Others
from utils import *
from utils import *
from config import *
from config import *
```
```
%% Output
%% Output
INFO:tensorflow:Enabling eager execution
INFO:tensorflow:Enabling eager execution
INFO:tensorflow:Enabling v2 tensorshape
INFO:tensorflow:Enabling v2 tensorshape
INFO:tensorflow:Enabling resource variables
INFO:tensorflow:Enabling resource variables
INFO:tensorflow:Enabling tensor equality
INFO:tensorflow:Enabling tensor equality
INFO:tensorflow:Enabling control flow v2
INFO:tensorflow:Enabling control flow v2
WARNING:tensorflow:SavedModel saved prior to TF 2.5 detected when loading Keras model. Please ensure that you are saving the model with model.save() or tf.keras.models.save_model(), *NOT* tf.saved_model.save(). To confirm, there should be a file named "keras_metadata.pb" in the SavedModel directory.
WARNING:tensorflow:SavedModel saved prior to TF 2.5 detected when loading Keras model. Please ensure that you are saving the model with model.save() or tf.keras.models.save_model(), *NOT* tf.saved_model.save(). To confirm, there should be a file named "keras_metadata.pb" in the SavedModel directory.
Model used: firstModel
Model used: firstModel
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
```
#Chargement des données
#Chargement des données
print("Array loading...")
print("Array loading...")
Xf = np.load("data/array/Xf")
Xf = np.load("data/array/Xf")
Xe = np.load("data/array/Xe")
Xe = np.load("data/array/Xe")
Xa = np.load("data/array/Xa")
Xa = np.load("data/array/Xa")
Xr = np.load("data/array/Xr")
Xr = np.load("data/array/Xr")
Yf = np.load("data/array/Yf")
Yf = np.load("data/array/Yf")
Ye = np.load("data/array/Ye")
Ye = np.load("data/array/Ye")
Ya = np.load("data/array/Ya")
Ya = np.load("data/array/Ya")
Yr = np.load("data/array/Yr")
Yr = np.load("data/array/Yr")
print("Concatenation...")
print("Concatenation...")
X = np.concatenate([Xf, Xa, Xe, Xr])
X = np.concatenate([Xf, Xa, Xe, Xr])
Y = np.concatenate([Yf, Ya, Ye, Yr])
Y = np.concatenate([Yf, Ya, Ye, Yr])
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
```
#Enregistre X et Y directement, à faire si assez de ram
#Enregistre X et Y directement, à faire si assez de ram