"...resnet50_tensorflow.git" did not exist on "7d1cfc1e5e1244ee5fbbd83a2dce8b10611caede"
Unverified Commit 8a668783 authored by Ruilong Li(李瑞龙)'s avatar Ruilong Li(李瑞龙) Committed by GitHub
Browse files

Update vdb.py

parent 1e46cb1d
...@@ -80,9 +80,8 @@ class VDBEstimator(AbstractEstimator): ...@@ -80,9 +80,8 @@ class VDBEstimator(AbstractEstimator):
) )
def state_dict(self): def state_dict(self):
state_dict = super().state_dict() state_dict = self.state_dict()
state_dict["grid"] = self.grid state_dict["grid"] = self.grid
state_dict["occs"] = self.occs.state_dict()
return state_dict return state_dict
def load_state_dict( def load_state_dict(
...@@ -96,7 +95,7 @@ class VDBEstimator(AbstractEstimator): ...@@ -96,7 +95,7 @@ class VDBEstimator(AbstractEstimator):
mutable=True, mutable=True,
) )
remaining_state_dict = { remaining_state_dict = {
k: v for k, v in state_dict.items() if k not in ["grid", "occs"] k: v for k, v in state_dict.items() if k not in ["grid"]
} }
super().load_state_dict(remaining_state_dict, strict=strict) super().load_state_dict(remaining_state_dict, strict=strict)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment