Artificial Neural Networks and Deep Learning 2021 - Homework 2 Forum

Go back to competition Back to thread list Post in this thread

> Error: "bad martial data"

I'll summarize the error first:
On the 2nd error call it says:
- File "/multiverse/storage/lattari/Prj/phd/AN2DL/Competition_2_running_dir/worker_gpu1_dir/tmp/codalab/tmp9KIH3y/run/input/res/model.py", line 8, in _init_self.model = tf.keras.models.load_model(os.path.join(path, 'SubmissionModel/cnn_model_simple_15epocs_7labels_864_864.h5'))
At last, it says:
- ValueError: bad marshal data (unknown type code)

The name of the model.h5 is correct. I ran the model.py exactly as I submitted it on my PC, and everything has worked correctly.
To load the model I wrote this simple code:
from Submissions.sub01 import model
df = pd.read_csv('Training.csv')
x = tf.convert_to_tensor(df.values)
model1 = model.model('Submissions/sub01')
model1.predict(x)
And everything worked properly, with an output tensor of shape of (864, 7).

Now, I don't know where the problem can be... Maybe in the shape of my model?
On GitHub and StackOverflow they say it could be for the version of Python you use on your side, or it could be for the shape of the model, or because you need to run "pip3 install -U setuptools"...
What should I do?

Posted by: EugenioBertolini @ Dec. 23, 2021, 4 p.m.
Post in this thread