hyf015 / egocentric-gaze-prediction

Code for the paper "Predicting Gaze in Egocentric Video by Learning Task-dependent Attention Transition"
62 stars 18 forks source link

We cannot go into SP module during testing #15

Closed kazucmpt closed 5 years ago

kazucmpt commented 5 years ago

You wrote like below in gaze_full.py

if args.train_sp:   sp = SP(lr=args.lr, loss_save=args.sp_save_img, save_name=args.save_sp,...)   sp.train()    args.pretrained_model = os.path.join(args.save_path, args.save_sp)

But it should be

sp = SP(lr=args.lr, loss_save=args.sp_save_img, save_name=args.save_sp,...) if args.train_sp:    sp.train()   args.pretrained_model = os.path.join(args.save_path, args.save_sp) else:   sp.testSP()

hyf015 commented 5 years ago

You can modify as you wish, I did this because sometimes I only want to use trained SP module without training or testing.

kazucmpt commented 5 years ago

Thank you. How about LSTM? If I only want to use trained LSTM module without training, I should modify

att = AT(pretrained_model =args.pretrained_model, ...) if args.train_lstm:  att.train() else:  att.testLSTM()

right?

hyf015 commented 5 years ago

Yes, sure.

kazucmpt commented 5 years ago

I understood. Thank you.