tensorflow/compiler/mlir/tensorflow/transforms/lower_tf.cc
// Returns float DenseElementsAttr with scalar shape with the specified value.
Returns float DenseElementsAttr with scalar shape with the specified value.
Returns float DenseElementsAttr with scalar shape with the specified value .
static DenseElementsAttr GetScalarOfFloatType(Type ty, double raw_value) {
  auto float_ty = ty.cast<FloatType>();
  FloatAttr attr = FloatAttr::get(float_ty, raw_value);
  RankedTensorType scalar_ty = RankedTensorType::get({}, ty);
  return DenseElementsAttr::get(scalar_ty, attr);
}
static DenseElementsAttr GetScalarOfFloatType ( Type ty , double raw_value ) { auto float_ty = ty . cast < FloatType > ( ) ; FloatAttr attr = FloatAttr :: get ( float_ty , raw_value ) ; RankedTensorType scalar_ty = RankedTensorType :: get ( { } , ty ) ; return DenseElementsAttr :: get ( scalar_ty , attr ) ; }
Returns float DenseElementsAttr with scalar shape with the specified value.
Returns float DenseElementsAttr with scalar shape with the specified value .