-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loading pretrained model error #5
Comments
Hey, the logging information is a little bit confusing here. The
It tries to restore a separately pretrained SLT model, e.g. pretrained encoders or decoders, which we never used.
It tries to restore from existing working directory. If your job got corrupted, it should recover the training from the working directory, i.e. output_dir. |
Oh! I'm sorry, loading pretrained model may not the important problem. The original error seems like h5 file.
When I run Step 2. command 4. I got dev.h5 test.h5 train.h5 and train_(0-9).h5 in path smkd/features and then I combine different training features and move dev/test/train.h5 to path smkd-sign-features/, which wrote in train.sh. sh example/train.sh |
This could be checked by inspecting the source_train_file and the resulted train.h5. Could you please show a few lines in your train file? and also read train.h5 with h5py and check its keys? there might be some mismatch. |
After I run command below, I got dev.h5, test.h5, train.h5 and train_(0-9).h5 in sltunet/smkd/features python main.py --load-weights avg/average.pt --phase features --device 0 --num-feature-aug 10 --work-dir exp/resnet34 --config baseline.yaml This is my sign_feature_cmb.py file. Should I combine train.h5 and train_(0-9).h5 in a new h5 file or only combine train_(0-9).h5? I guess this line import sys
import glob
import h5py
files = glob.glob(sys.argv[1])
print(files)
writer = h5py.File('train.h5', 'w')
for i, f in enumerate(files):
reader = h5py.File(f, 'r')
for key in list(reader.keys()):
writer.create_dataset("%s_%s" % (key, i), data=reader[key][()])
reader.close()
writer.close() |
could you please list some keys from your |
I have solved this error. It happens when I run sign_feature_cmb.py on the same path of train.h5 and train_(0-9).h5. I show my path below. smkd/features
├── dev.h5
├── test.h5
└── train
├── sign_feature_cmb.py
├── train_0.h5
├── train_1.h5
├── train_2.h5
├── train_3.h5
├── train_4.h5
├── train_5.h5
├── train_6.h5
├── train_7.h5
├── train_8.h5
├── train_9.h5
└── train.h5
1 directory, 12 files |
When I follow the instruction below in sltunet/example, I can't get right combined train.h5 file because that after I run Step 2. extract sign features, I got directory below. python sign_feature_cmb.py train\*h5 Directory after extract: smkd/features
├── dev.h5
├── test.h5
├── train_0.h5
├── train_1.h5
├── train_2.h5
├── train_3.h5
├── train_4.h5
├── train_5.h5
├── train_6.h5
├── train_7.h5
├── train_8.h5
├── train_9.h5
└── train.h5 |
Hey, I'm coming again! When I do Step 3. Train SLTUnet Model, I moved required files in two folders in train.sh file and run train.sh. When the code run to loading pretrained model, I got a warning below:
How can I load pretrained model? Is pretrained model trained in Step 2? Thanks!
This is my train.sh
The text was updated successfully, but these errors were encountered: