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
Describe the bug
I installed it according to the installation steps. I used ema in my project, which used deepcopy code, and this error occurred when the project was running.
“TypeError: cannot pickle 'MinkowskiConvolutionFunction' object”
Expected behavior
The project is running normally
Desktop (please complete the following information):
import copy
import torch
from torch.nn import Module
class CustomModel(Module):
def __init__(self):
super(CustomModel, self).__init__()
# Initialize your model components here
def __deepcopy__(self, memo):
# Create a new instance of your model
new_instance = type(self)()
memo[id(self)] = new_instance
# Copy the state_dict of the original model to the new instance
new_instance.load_state_dict(copy.deepcopy(self.state_dict(), memo))
return new_instance
# Example usage
model = CustomModel()
ema_model = copy.deepcopy(model)
model = CustomModel()
ema_model = CustomModel()
ema_model.load_state_dict(copy.deepcopy(model.state_dict()))
Describe the bug
I installed it according to the installation steps. I used ema in my project, which used deepcopy code, and this error occurred when the project was running.
“TypeError: cannot pickle 'MinkowskiConvolutionFunction' object”
Expected behavior
The project is running normally
Desktop (please complete the following information):
OS: [e.g. Ubuntu 18.04]
Python version: [e.g. 3.8.13]
Pytorch version: [e.g. 1.10.1]
CUDA version: [e.g. 11.3]
NVIDIA Driver version: [e.g. 510.60]
Minkowski Engine version [e.g. 0.5.4]
The text was updated successfully, but these errors were encountered: