megengine.hub.load_serialized_obj_from_url

load_serialized_obj_from_url(url, model_dir=None)[source]

Loads MegEngine serialized object from the given URL.

If the object is already present in model_dir, it’s deserialized and returned. If no model_dir is specified, it will be MGE_HOME/serialized.

Parameters
  • url (str) – url to serialized object.

  • model_dir – dir to cache target serialized file.

Return type

Any

Returns

loaded object.