gsbDBI / torch-choice

Choice modeling with PyTorch: logit model and nested logit model
MIT License
41 stars 9 forks source link

Allow different lambdas across nests? #48

Open Serena9070 opened 8 months ago

Serena9070 commented 8 months ago

Hi Tianyu,

Thanks for the amazing package! I'm trying to allow different lambdas across nests by setting shared_lambda = False. However, it ran into the RuntimeError: Error(s) in loading state_dict for NestedLogitModel: Unexpected key(s) in state_dict: "lambdas". I wonder if there is a way to fix this. Thanks!

Serena9070 commented 7 months ago

Hi Tianyu,

Thanks for updating the package to allow different lambdas across nests. Sorry, I have encountered another problem. When I tried setting "shared_lambda=False", I keep having the error: lambdas and lambda_weight should be the same. I wonder if there is a way to fix this or if you have any idea what's the potential cause. Thanks!

TianyuDu commented 7 months ago

Oops, that's a sanity check I implemented, and it seems to fail... Could you please attach a script that could replicate this issue? Ideally, with sample data, you can replace actual data with dummy values if the dataset is sensitive. Thank you!