type Class — pytorch Architecture
Architecture documentation for the type class in ivalue_inl.h from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/core/ivalue_inl.h lines 777–788
template <typename T = c10::TupleType>
std::shared_ptr<T> type() const {
if (!type_) {
type_ = TupleTypeFactory<T>::create(fmap(elements(), [&](const IValue& v) {
return v.type<typename T::ElementType>();
}));
}
if (auto t = type_->cast<T>()) {
return t;
}
return TupleTypeFactory<T>::fallback(*type_);
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free