| 57 | } |
| 58 | |
| 59 | Maybe<LocalTensor> StaticZerosTensor::AsLocalTensor() { |
| 60 | CHECK_OR_RETURN(is_local()); // NOLINT |
| 61 | return std::dynamic_pointer_cast<LocalTensor>( |
| 62 | JUST(functional::Constant(*shape_, Scalar(0), CHECK_JUST(DType::Get(dtype_)), device_))); |
| 63 | } |
| 64 | |
| 65 | Parameter::Parameter(const std::shared_ptr<Tensor>& tensor, bool requires_grad) |
| 66 | : ProxyTensor<Parameter>(tensor) { |
no test coverage detected