We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hi, I noticed converting HashMap with i64 as keys to tch::IValue::GenericDict results in an object of type Dict[Any,Any] on the python side:
tch::IValue::GenericDict
pub fn create_int_tensor_dict_ivalue(hm: &HashMap<i64, tch::Tensor>) -> tch::IValue { tch::IValue::GenericDict( hm.iter() .map(|(k, v)| { ( tch::IValue::Int(*k), tch::IValue::Tensor(tch::Tensor::shallow_clone(v)), ) }) .collect::<Vec<(tch::IValue, tch::IValue)>>(), ) }
However, hashmaps with strings as keys are typed as Dict[str, Tensor], could we add support for int as keys ?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
hi, I noticed converting HashMap with i64 as keys to
tch::IValue::GenericDict
results in an object of type Dict[Any,Any] on the python side:However, hashmaps with strings as keys are typed as Dict[str, Tensor], could we add support for int as keys ?
The text was updated successfully, but these errors were encountered: