Why does my `validation_loss`

plot have many fluctuation? Also, its loss range is from 0.4 to 1.2?

And also, why does it start from low to high? Isn’t that weird?

My code:

```
import tensorflow as tf
import scipy.io as spio
import random as rn
import numpy as np
import os
from keras import backend as K
mat=spio.loadmat('32_32/X_train123.mat', squeeze_me=True)
mat1=spio.loadmat('32_32/Y_train123.mat',squeeze_me=True)
mat2=spio.loadmat('32_32/X_test123.mat',squeeze_me=True)
mat3=spio.loadmat('32_32/Y_test123.mat',squeeze_me=True)
x_train=mat['x_test'] # x_test is x_train. typo
y_train=mat1['y_train']
x_test=mat2['x_test']
y_test=mat3['y_test']
print(x_train.shape)
print(y_train.shape)
print(x_test.shape)
print(y_test.shape)
#########################################################################################################################
os.environ['PYTHONHASHSEED']='0'
np.random.seed(37)
rn.seed(1254)
tf.set_random_seed(89)
session_conf = tf.ConfigProto(intra_op_parallelism_threads=1, inter_op_parallelism_threads=1)
sess = tf.Session(graph=tf.get_default_graph(), config=session_conf)
K.set_session(sess)
#############################################################################################################################
model=tf.keras.models.Sequential()
#model.add(tf.keras.layers.Flatten()) ###############don't delet
model.add(tf.keras.layers.Dense(256,input_dim=3001,activation=tf.nn.tanh))
model.add(tf.keras.layers.Dense(256,activation=tf.nn.tanh))
#model.add(tf.keras.layers.Dropout(0.5))
model.add(tf.keras.layers.Dense(128,activation=tf.nn.tanh))
model.add(tf.keras.layers.Dense(128,activation=tf.nn.tanh))
model.add(tf.keras.layers.Dropout(0.5))
model.add(tf.keras.layers.Dense(1, activation=tf.nn.sigmoid))
model.compile(optimizer='adam',loss='binary_crossentropy',metrics=['accuracy'])
history = model.fit(x_train, y_train,
validation_data=(x_test, y_test),
epochs=300)
###########################################################################################3
val_loss,val_acc =model.evaluate(x_test,y_test)
```

In this plot the epochs is 500.And as you see ,it seems that something is repeated frequently.