mobaidoctor / med-ddpm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ERROR: Can't pickle <function <lambda>

kitofito opened this issue · comments

Hello, thank you very much for your previous response to my issue. I've been encountering the following error for many weeks, and I still don't know how to resolve it. I would greatly appreciate it if you could help me fix this error, please.

Thank you.
Med-DDPM_error

I ran the project in Google Colab, and it worked for me!

Hi, @kitofito, thank you for reaching out. Which version of Python are you using? The "pickle.PicklingError: Can't pickle " error arises because Python's pickle module cannot serialize lambda functions. Here are some simple steps to resolve the issue:

  • Convert lambdas to standard functions.
  • Utilize the dill library.
    If you continue to experience problems after trying these solutions, please let us know. Thank you.