15 : input_shape_{input.shape()},
16 input_strides_{input.strides()},
17 input_type_{input.dtype()},
18 out_shape_{out.shape()},
19 out_strides_{out.strides()},
20 out_type_{out.dtype()},
21 output_size_{out.numel()},
23 is_input_contiguous_{input.IsContiguous()},
24 is_out_contiguous_{out.IsContiguous()},
25 device_index_{out.device().index()} {
26 assert(input_shape_ == out_shape_ &&
27 "`GelutanhInfinilm` input and output shapes must match");
28 assert(input_type_ == out_type_ &&
29 "`GelutanhInfinilm` input and output dtypes must match");
30 assert(!out.HasBroadcastDim() &&
31 "`GelutanhInfinilm` output must not have broadcasted dimensions");