Rate this Page

Define _TORCH_OPTIM_DESERIALIZE_TORCH_ARG_OPTIONAL#

Define Documentation#

_TORCH_OPTIM_DESERIALIZE_TORCH_ARG_OPTIONAL(T, name)   {                                                          \     c10::IValue

ivalue;                                      \

bool exists = archive.try_read(#name, ivalue);           \

if (exists) {                                            \

name(ivalue.toOptional<T>());                          \

}                                                        \

}

#