Skip to content
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

AttributeError: 'DeepHitSingle' object has no attribute 'state_dict' #167

Open
zachfreitas opened this issue Jun 10, 2023 · 1 comment
Open

Comments

@zachfreitas
Copy link

I'm trying to save my model using tensor flow save and I get the following Error when I use state_dict.
mdl.state_dict()
I get the follwing
AttributeError: 'DeepHitSingle' object has no attribute 'state_dict'

Is there a way around this?

@mahootiha-maryam
Copy link

Firstly pycox is based on pytorch, not tensorflow. Also for saving models you can not use state_dict you can save models in pycox in this way.

model.save_model_weights('myweights.pt')
model.load_model_weights('myweights.pt')

Also there was a previous issue on this question that havard explained it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants