mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/14646 Reviewed By: ezyang Differential Revision: D13283494 fbshipit-source-id: c62e7f9b02551926bf8f1e3ddf6ede4ec925d28d
23 lines
573 B
C++
23 lines
573 B
C++
#include <c10/core/TensorOptions.h>
|
|
|
|
#include <c10/Device.h>
|
|
#include <c10/core/Layout.h>
|
|
#include <c10/core/ScalarType.h>
|
|
#include <c10/util/Optional.h>
|
|
|
|
#include <iostream>
|
|
|
|
namespace c10 {
|
|
|
|
std::ostream& operator<<(
|
|
std::ostream& stream,
|
|
const TensorOptions& options) {
|
|
return stream << "TensorOptions(dtype=" << options.dtype()
|
|
<< ", device=" << options.device()
|
|
<< ", layout=" << options.layout()
|
|
<< ", requires_grad=" << std::boolalpha
|
|
<< options.requires_grad() << ")";
|
|
}
|
|
|
|
} // namespace c10
|