Submitted by Constant-Cranberry29 t3_y0deqh in deeplearning
I have trained the data and the results are quite good ... but when I want to test it using other data the model that has been trained can't predict well. where is the fault
dataset A:
Dataset B:
Data Preprocessing
SmartInsole = np.array(data4test)
AvgFC = np.array(Avg)
Dataset = np.concatenate((SmartInsole, AvgFC), axis=1)
​
The dataset after splitting and normalized:
​
I am working with Keras and trying to fit a resnet50 to the data just to evaluate it. Below is the my resnet model structure:
Below is identity blok:
​
Below is dens_block:
​
Resnet50 model:
​
Essentially, I am fitting the model to each dataset as follows:
import datetime from tensorflow.keras
import layers,models
model = ResNet50Regression()
model.compile(loss='mae', optimizer=Adam(learning_rate=0.0001), metrics=['mse']) model.summary()
starttime = datetime.datetime.now()
history = model.fit(X_train, y_train, epochs=2000, batch_size=64, verbose=2, validation_split=0.1)
endtime = datetime.datetime.now()
This is the result of prediction of training data using X_test data, the results of the prediction are quite good
This prediction results using other data, it can be seen from the prediction results that the model is not able to predict optimally. how to make the model work well even though it uses other data
​
Note : the total of Dataset is 3000,then I split it for training and testing data Data for Training is 2450 and data for testing is 550
_Arsenie_Boca_ t1_irr84f2 wrote
I guess this is timeseries forecasting. You should think about the lookahead. Probably, during training, the model only has to predict the next point, while during testing, it has to predict many values autoregressively