mjpramirez / Volvo-DataX

https://matthew29tang.github.io/pid-model/#/
MIT License
31 stars 15 forks source link

How to train the ST-DenseNet? #2

Open Terencce opened 3 years ago

Terencce commented 3 years ago

Hi, It would be helpful to know the how to retrain the model with own data. Could you provide some information on that? x_train_images = load('latest_train_x.npy') y_train = load('latest_train_y.npy') y_train = to_categorical(y_train) x_test_images = load('latest_test_x.npy') y_test = load('latest_test_y.npy') y_test = to_categorical(y_test) like this,how to prepare the datasets? from conv3d_net_working import DenseNet3D_121 model = DenseNet3D_121((100, 100, 16, 3)) model.compile(loss=keras.losses.categorical_crossentropy, optimizer = keras.optimizers.SGD(lr=1e-4), metrics=['accuracy']) and, can you provide the file 'conv3d_net_working'? Thanks~

mjpramirez commented 3 years ago

Let me know if this works!

conv3d_net_working.py.zip

Terencce commented 3 years ago

Thank you very much for the information you provided, but in the next step, I encountered a new problem, as shown in the figure below. image I understand that the problem lies in the input of my data. x_train_images = load('latest_train_x.npy') y_train = load('latest_train_y.npy') y_train = to_categorical(y_train) x_test_images = load('latest_test_x.npy') y_test = load('latest_test_y.npy') y_test = to_categorical(y_test)

So,could you provide some information about how to prepare the datasets?

Thank you very much~