Skip to content
This repository was archived by the owner on Jan 7, 2025. It is now read-only.
This repository was archived by the owner on Jan 7, 2025. It is now read-only.

TypeError: can't pickle _thread.RLock objects #114

Description

@gkrislara

I am trying to save json file using model.to_json() for rrdn model
I have modified the class to input only patch size
dense=RRDN(patch_size=patch_size) # model weights are loaded here
model=dense.model
with open(os.path.join('RRDN_40x40_C4D30G32G032T10x4.json'), 'w') as f:
f.write(model.to_json())

While executing the program I get the following error:
File "/opt/vitis_ai/conda/envs/vitis-ai-tensorflow/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/opt/vitis_ai/conda/envs/vitis-ai-tensorflow/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/opt/vitis_ai/conda/envs/vitis-ai-tensorflow/lib/python3.6/copy.py", line 169, in deepcopy
rv = reductor(4)
TypeError: can't pickle _thread.RLock objects

I referred #107 but still I am unable to solve the issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions