ExTorch.Utils.Types (extorch v0.1.0-pre0)

General type hierarchy comparison utils

Link to this section Summary

Functions

Given a list/tuples with elements or lists/tuples of elements, determine the base type ExTorch.DType.base_type() that the list should have when converting it into a tensor.

Given two basic types, compare them and return the type that subsumes the other one.

Link to this section Functions

Link to this function

collect_types(tup, acc)

@spec collect_types(list() | tuple() | number() | boolean(), MapSet.t()) :: MapSet.t()

Given a list/tuples with elements or lists/tuples of elements, determine the base type ExTorch.DType.base_type() that the list should have when converting it into a tensor.

Link to this function

compare_types(x, y)

Given two basic types, compare them and return the type that subsumes the other one.