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

how to save and load the checkpoint of splitNN? #94

Open
lepangdan opened this issue May 30, 2022 · 0 comments
Open

how to save and load the checkpoint of splitNN? #94

lepangdan opened this issue May 30, 2022 · 0 comments
Labels
Type: Question ❔ Question about implementation or some technical aspect

Comments

@lepangdan
Copy link

Question

How to save and load the checkpoint of splitNN?

Further Information

Even though it is easy to save and load models in vanilla PyTorch, I encountered some trouble when I did the same thing in hook

Here is my code and corresponding result, I couldn't get the value of weights, instead of wrapped pointer Tensor. Please help

def state_dict(self):
        res = {}
        for model in self.models:
            res = {k: v for k, v in model.state_dict().items()}
        for k, v in res.items():
            print('k, v', k, v)
        return res
k, v final_layer.bias (Wrapper)>[PointerTensor | me:14397441124 -> bob:14831367252]::data
models_state_dict {'final_layer.weight': (Wrapper)>[PointerTensor | me:42574993002 -> bob:7259753333]::data, 'final_layer.bias': (Wrapper)>[PointerTensor | me:14397441124 -> bob:14831367252]::data}
k, v final_layer.weight (Wrapper)>[PointerTensor | me:42574993002 -> bob:7259753333]::data
k, v final_layer.bias (Wrapper)>[PointerTensor | me:14397441124 -> bob:14831367252]::data
@lepangdan lepangdan added the Type: Question ❔ Question about implementation or some technical aspect label May 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Question ❔ Question about implementation or some technical aspect
Projects
None yet
Development

No branches or pull requests

1 participant