mirror of
https://github.com/pytorch/pytorch.git
synced 2025-11-06 17:24:59 +08:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/14746 Reviewed By: ezyang Differential Revision: D13318644 fbshipit-source-id: b703d7dc67e75d9e9571c80d62a100c5fc4e84df
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
|