You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I set use_contrastive_slotname_predictor: True and use_final_predictor: False, and run the script " python slu_main_debug.py --exp_name pclc --exp_id ap_0 --bidirection --freeze_emb --tgt_dm AddToPlaylist --n_samples 0 --tr --emb_file ./data/snips/emb/slu_word_char_embs_with_slotembs.npy"
however, the code error occurred,
File "E:\Project\joint_inent_slot\zero-shot\pcslot\src\slu\trainer_debug.py", line 67, in train_step
loss_slotname, slot_contrastive_loss= self.slotname_predictor(y_dm, lstm_hiddens, binary_golds=y_bin, final_golds=y_final)
File "D:\miniconda3\lib\site-packages\torch\nn\modules\module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "E:\Project\joint_inent_slot\zero-shot\pcslot\src\slu\model_debug.py", line 498, in forward
loss_slotname += self.smoothLoss(pred_slotname_each_sample, gold_slotname_each_sample)
File "D:\miniconda3\lib\site-packages\torch\nn\modules\module.py", line 1177, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'ContrastiveSlotNamePredictor' object has no attribute 'smoothLoss'
Does any wrong with the setting of code? Appreciated for responsed.
The text was updated successfully, but these errors were encountered:
I set use_contrastive_slotname_predictor: True and use_final_predictor: False, and run the script " python slu_main_debug.py --exp_name pclc --exp_id ap_0 --bidirection --freeze_emb --tgt_dm AddToPlaylist --n_samples 0 --tr --emb_file ./data/snips/emb/slu_word_char_embs_with_slotembs.npy"
however, the code error occurred,
File "E:\Project\joint_inent_slot\zero-shot\pcslot\src\slu\trainer_debug.py", line 67, in train_step
loss_slotname, slot_contrastive_loss= self.slotname_predictor(y_dm, lstm_hiddens, binary_golds=y_bin, final_golds=y_final)
File "D:\miniconda3\lib\site-packages\torch\nn\modules\module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "E:\Project\joint_inent_slot\zero-shot\pcslot\src\slu\model_debug.py", line 498, in forward
loss_slotname += self.smoothLoss(pred_slotname_each_sample, gold_slotname_each_sample)
File "D:\miniconda3\lib\site-packages\torch\nn\modules\module.py", line 1177, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'ContrastiveSlotNamePredictor' object has no attribute 'smoothLoss'
Does any wrong with the setting of code? Appreciated for responsed.
The text was updated successfully, but these errors were encountered: